aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-09-29 12:22:54 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:52:27 -0400
commitab37128797148edb5993d98b638d668f75ee5119 (patch)
treef3fb9bc5f9d9be82006bbd0fe2b5ad6a222a5536 /drivers/message/fusion
parente1fc2b5167f9c3614099e55d3f49763a26a5a339 (diff)
[SCSI] mptctl : shutup uninitialized variable warnings
drivers/message/fusion/mptctl.c: In function ‘mptctl_mpt_command’: drivers/message/fusion/mptctl.c:1764: warning: ‘bufIn.len’ may be used uninitialized in this function drivers/message/fusion/mptctl.c:1765: warning: ‘bufOut.len’ may be used uninitialized in this function come because gcc gets confused by some "goto" statements in above function. The warnings have been verified to be bogus, however, the function does initialize these later (after the offending goto's) in the function anyway. So let's move those initializations to top of function, thereby also shutting up these warnings. Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/mptctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 70178a8940b2..6029509702d3 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1774,7 +1774,10 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
1774 ulong timeout; 1774 ulong timeout;
1775 struct scsi_device *sdev; 1775 struct scsi_device *sdev;
1776 1776
1777 /* bufIn and bufOut are used for user to kernel space transfers
1778 */
1777 bufIn.kptr = bufOut.kptr = NULL; 1779 bufIn.kptr = bufOut.kptr = NULL;
1780 bufIn.len = bufOut.len = 0;
1778 1781
1779 if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) || 1782 if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
1780 (ioc == NULL)) { 1783 (ioc == NULL)) {
@@ -2108,11 +2111,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
2108 psge = (char *) (((int *) mf) + karg.dataSgeOffset); 2111 psge = (char *) (((int *) mf) + karg.dataSgeOffset);
2109 flagsLength = 0; 2112 flagsLength = 0;
2110 2113
2111 /* bufIn and bufOut are used for user to kernel space transfers
2112 */
2113 bufIn.kptr = bufOut.kptr = NULL;
2114 bufIn.len = bufOut.len = 0;
2115
2116 if (karg.dataOutSize > 0) 2114 if (karg.dataOutSize > 0)
2117 sgSize ++; 2115 sgSize ++;
2118 2116