scsi: libcxgbi: remove uninitialized variable len
authorColin Ian King <colin.king@canonical.com>
Sat, 16 Mar 2019 22:57:09 +0000 (22:57 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Mar 2019 00:56:35 +0000 (20:56 -0400)
commit8378573353728a02602d6f956a3df48db0505c65
treeb76417e30987f0778985dcf6bcca9a8373937e63
parent82129697df9d90afd22736acd89d24f98bde2522
scsi: libcxgbi: remove uninitialized variable len

The variable len is not being inintialized and the uninitialized value is
being returned. However, this return path is never reached because the
default case in the switch statement returns -ENOSYS.  Clean up the code by
replacing the return -ENOSYS with a break for the default case and
returning -ENOSYS at the end of the function.  This allows len to be
removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxgbi/libcxgbi.c