diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-10 23:24:55 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-20 02:32:00 +0200 |
commit | 5236467ae72ecd71baa162b7734c57bfe8fa0ff9 (patch) | |
tree | f72885a8d34b7af13a2def68592ab5465a9b7a9f /drivers/scsi/megaraid/megaraid_mm.c | |
parent | Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/rolan... (diff) | |
download | linux-5236467ae72ecd71baa162b7734c57bfe8fa0ff9.tar.xz linux-5236467ae72ecd71baa162b7734c57bfe8fa0ff9.zip |
[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: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mm.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index 8f3ce0432295..e8f534fb336b 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c @@ -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)); |