]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Correct kmalloc check: drivers_scsi_dpt_i2o.c
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Jan 2003 12:13:23 +0000 (04:13 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 13 Jan 2003 12:13:23 +0000 (04:13 -0800)
From:  Pablo Menichini <pablo@menichini.com.ar>

drivers/scsi/dpt_i2o.c

index 1cf41aa18c9c8c4be1ae7419f31e9ebb904cabcb..1fb2d77cf0dd9a165027699302804c149cdf7965 100644 (file)
@@ -1491,7 +1491,7 @@ static int adpt_i2o_parse_lct(adpt_hba* pHba)
                                                        pDev->next_lun; pDev = pDev->next_lun){
                                        }
                                        pDev->next_lun = kmalloc(sizeof(struct adpt_device),GFP_KERNEL);
-                                       if(pDev == NULL) {
+                                       if(pDev->next_lun == NULL) {
                                                return -ENOMEM;
                                        }
                                        memset(pDev->next_lun,0,sizeof(struct adpt_device));