diff options
Diffstat (limited to 'drivers/mtd/devices/block2mtd.c')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 6a9fb80339fb..3bc92153e2b6 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -308,9 +308,9 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) | |||
308 | /* We might not have rootfs mounted at this point. Try | 308 | /* We might not have rootfs mounted at this point. Try |
309 | to resolve the device name by other means. */ | 309 | to resolve the device name by other means. */ |
310 | 310 | ||
311 | dev_t dev = name_to_dev_t(devname); | 311 | dev_t devt = name_to_dev_t(devname); |
312 | if (dev != 0) { | 312 | if (devt) { |
313 | bdev = open_by_devnum(dev, FMODE_WRITE | FMODE_READ); | 313 | bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ); |
314 | } | 314 | } |
315 | } | 315 | } |
316 | #endif | 316 | #endif |