hwrng: core - remove redundant initialization of variable err

'err' will be assigned later and cleanup the redundant initialization.

Cc: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Shaokun Zhang 2021-05-20 15:56:11 +08:00 committed by Herbert Xu
parent 5c0ecc2e81
commit cb028f1662
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ static ssize_t hwrng_attr_current_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
int err = -ENODEV;
int err;
struct hwrng *rng, *old_rng, *new_rng;
err = mutex_lock_interruptible(&rng_mutex);