]> git.baikalelectronics.ru Git - kernel.git/commit
IB/iser: remove uninitialized variable len
authorColin Ian King <colin.king@canonical.com>
Sat, 16 Mar 2019 23:05:12 +0000 (23:05 +0000)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 27 Mar 2019 13:20:33 +0000 (10:20 -0300)
commit0d361dd0a5d061e5d93cecd803d06bec088b1813
treeee0003eb24fa2a8e8a68009da5ac6733dfdb5569
parentb89f29b39446d38057bab83e8b3e38c327005fbc
IB/iser: 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.  Also remove redundant break that follows a return statement.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/iser/iscsi_iser.c