From: Mark Haverkamp Date: Wed, 30 Nov 2005 20:01:39 +0000 (-0800) Subject: [SCSI] aacraid: Check scsi_bios_ptabe return code X-Git-Tag: v2.6.15-rc5~14^2~10 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8bdf810f89c3e686ba18a11e2852f32014f1506a;p=linux-2.6-omap-h63xx.git [SCSI] aacraid: Check scsi_bios_ptabe return code Received from Mark Salyzyn. scsi_bios_ptable return value is not being checked in aac_biosparm. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index ab383d1f59e..3cb68af9045 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -325,6 +325,8 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, * translations ( 64/32, 128/32, 255/63 ). */ buf = scsi_bios_ptable(bdev); + if (!buf) + return 0; if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) { struct partition *first = (struct partition * )buf; struct partition *entry = first;