From: Andrew Morton Date: Tue, 5 Feb 2008 07:53:26 +0000 (-0800) Subject: [SCSI] dc395x: fix uninitialized var warning X-Git-Tag: v2.6.25-rc1~285^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8144f2137b7c69055597bb644a3cb6d08ee0de77;p=linux-2.6 [SCSI] dc395x: fix uninitialized var warning drivers/scsi/dc395x.c: In function 'dc395x_init_one': drivers/scsi/dc395x.c:4270: warning: 'ptr' may be used uninitialized in this function Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 22ef3716e7..e351db6c00 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -4267,7 +4267,7 @@ static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) const unsigned srbs_per_page = PAGE_SIZE/SEGMENTX_LEN; int srb_idx = 0; unsigned i = 0; - struct SGentry *ptr; + struct SGentry *uninitialized_var(ptr); for (i = 0; i < DC395x_MAX_SRB_CNT; i++) acb->srb_array[i].segment_x = NULL;