]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit09c7d1d8a729cbb926bc143ab9441174de549045
treeb76417e30987f0778985dcf6bcca9a8373937e63
parent426e4f98cff27baf9f5146e9eb3fb8d56af2ed5e
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