You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] kfree cleanup: drivers/mtd
This is the drivers/mtd part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/mtd/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Joern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c9475cb0c3
commit
fa671646f6
@@ -126,10 +126,8 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
|
||||
}
|
||||
|
||||
if (add_mtd_blktrans_dev(&inftl->mbd)) {
|
||||
if (inftl->PUtable)
|
||||
kfree(inftl->PUtable);
|
||||
if (inftl->VUtable)
|
||||
kfree(inftl->VUtable);
|
||||
kfree(inftl->PUtable);
|
||||
kfree(inftl->VUtable);
|
||||
kfree(inftl);
|
||||
return;
|
||||
}
|
||||
@@ -147,10 +145,8 @@ static void inftl_remove_dev(struct mtd_blktrans_dev *dev)
|
||||
|
||||
del_mtd_blktrans_dev(dev);
|
||||
|
||||
if (inftl->PUtable)
|
||||
kfree(inftl->PUtable);
|
||||
if (inftl->VUtable)
|
||||
kfree(inftl->VUtable);
|
||||
kfree(inftl->PUtable);
|
||||
kfree(inftl->VUtable);
|
||||
kfree(inftl);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user