mtd: block2mtd: page_read() never returns NULL
Subsystems (3)
PATCH 1/1 mtd: block2mtd: page_read() never returns NULL
page_read() never returns NULL, so we can remove the NULL check here.
Signed-off-by Ryosuke Saito <[email protected]>
--- drivers/mtd/devices/block2mtd.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/mtd/devices/block2mtd.c +0 -6
@@ -52,8 +52,6 @@ static int _block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len)while (pages) { page =page_read (mapping, index); -if (!page) -return -ENOMEM ;if (IS_ERR (page))return PTR_ERR (page);
@@ -112,8 +110,6 @@ static int block2mtd_read(struct mtd_info *mtd, loff_t from, size_t len, len = len - cpylen; page =page_read (dev->blkdev->bd_inode->i_mapping, index); -if (!page) -return -ENOMEM ;if (IS_ERR (page))return PTR_ERR (page);
@@ -148,8 +144,6 @@ static int _block2mtd_write(struct block2mtd_dev *dev, const u_char *buf, len = len - cpylen; page =page_read (mapping, index); -if (!page) -return -ENOMEM ;if (IS_ERR (page))return PTR_ERR (page);
Signature · 1 line
1.7.9.6
Artem Bityutskiy
AppliedQuoted 3 lines · Ryosuke Saito
page_read()never returns NULL, so we can remove the NULL check here.Signed-off-by Ryosuke Saito <[email protected]>
Pushed to l2-mtd.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy