aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0001.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-01-10 10:01:19 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 11:27:38 +0000
commit17fabf156507ec0f688f1e58be02f38e04de0c6e (patch)
tree08cb2aa3d7b9420d1b2e8f5c225060b2a8d4e75b /drivers/mtd/chips/cfi_cmdset_0001.c
parentmtd: nand: make Open Firmware device id constant (diff)
downloadlinux-dev-17fabf156507ec0f688f1e58be02f38e04de0c6e.tar.xz
linux-dev-17fabf156507ec0f688f1e58be02f38e04de0c6e.zip
mtd: cfi: remove unneeded NULL checks
In cfi_intelext_setup and cfi_amdstd_setup, mtd is never NULL. Remove unnecessary checks. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 5fbf29e1e64f..92530433c11c 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -615,10 +615,8 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd)
return mtd;
setup_err:
- if(mtd) {
- kfree(mtd->eraseregions);
- kfree(mtd);
- }
+ kfree(mtd->eraseregions);
+ kfree(mtd);
kfree(cfi->cmdset_priv);
return NULL;
}