aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-10 23:24:55 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-19 20:32:00 -0400
commit5236467ae72ecd71baa162b7734c57bfe8fa0ff9 (patch)
treef72885a8d34b7af13a2def68592ab5465a9b7a9f /drivers/scsi/megaraid
parent52824b6b5fa0533e2b2adc9df396d0e9ff6fb02a (diff)
[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')
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 8f3ce043229..e8f534fb336 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));