aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-10 17:24:55 -0500
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 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)
898 898
899 adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL); 899 adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL);
900 900
901 if (!adapter) { 901 if (!adapter)
902 rval = -ENOMEM; 902 return -ENOMEM;
903 goto memalloc_error;
904 }
905 903
906 memset(adapter, 0, sizeof(mraid_mmadp_t)); 904 memset(adapter, 0, sizeof(mraid_mmadp_t));
907 905