Re: [PATCH] mtd: block2mtd: remove redundant initialization of 'bdev'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 20 Jan 2018 22:09:34 +0000
Colin King <colin.king@xxxxxxxxxxxxx> wrote:

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 
> Pointer bdev is being initialized however this value is never
> read as bdev is assigned an updated value from the returned
> call to blkdev_get_by_path.  Remove the redundant assignment.
> 
> Cleans up clang warning:
> drivers/mtd/devices/block2mtd.c:228:23: warning: Value stored to
> 'bdev' during its initialization is never read
> 

Applied.

Thanks,

Boris

> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
>  drivers/mtd/devices/block2mtd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
> index 62fd6905c648..bb0734600a07 100644
> --- a/drivers/mtd/devices/block2mtd.c
> +++ b/drivers/mtd/devices/block2mtd.c
> @@ -225,7 +225,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size,
>  	int i;
>  #endif
>  	const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
> -	struct block_device *bdev = ERR_PTR(-ENODEV);
> +	struct block_device *bdev;
>  	struct block2mtd_dev *dev;
>  	char *name;
>  



-- 
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux