diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-01-20 22:09:34 +0000 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-03-15 17:15:34 +0100 |
commit | d40a18fec04ae6dc6f6760923aa5f487d1af2444 (patch) | |
tree | 0c7d5d0fa91f74dd66686daca9a9a28cc0e6d281 /drivers/mtd/devices | |
parent | 0dbe4ea78d69756efeb0bba0764f6bd4a9ee9567 (diff) |
mtd: block2mtd: remove redundant initialization of 'bdev'
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
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |