Commit 5236467a authored by Adrian Bunk's avatar Adrian Bunk Committed by James Bottomley

[SCSI] megaraid/megaraid_mm.c: fix a NULL pointer dereference

This patch fixes a NULL pointer dereference spotted by the Coverity
checker.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 52824b6b
...@@ -898,10 +898,8 @@ mraid_mm_register_adp(mraid_mmadp_t *lld_adp) ...@@ -898,10 +898,8 @@ mraid_mm_register_adp(mraid_mmadp_t *lld_adp)
adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL); adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL);
if (!adapter) { if (!adapter)
rval = -ENOMEM; return -ENOMEM;
goto memalloc_error;
}
memset(adapter, 0, sizeof(mraid_mmadp_t)); memset(adapter, 0, sizeof(mraid_mmadp_t));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment