提交 5236467a 编写于 作者: A Adrian Bunk 提交者: 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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 52824b6b
......@@ -898,10 +898,8 @@ mraid_mm_register_adp(mraid_mmadp_t *lld_adp)
adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL);
if (!adapter) {
rval = -ENOMEM;
goto memalloc_error;
}
if (!adapter)
return -ENOMEM;
memset(adapter, 0, sizeof(mraid_mmadp_t));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部