diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-07-22 18:44:04 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-07-25 05:09:56 +0300 |
commit | 55eb809f5e1c6d2a57e4c24a574fe09065e62534 (patch) | |
tree | c96fc05e3c6438f7a06d87ea9a2f3fd56973ee83 /drivers/scsi/libsas | |
parent | 386533796574bcdfe25ef3b8c520bc5f3a9d7c89 (diff) | |
download | linux-55eb809f5e1c6d2a57e4c24a574fe09065e62534.tar.xz |
scsi: libsas: Remove redundant assignment to variable res
The variable 'res' is being initialized with a value that is never read and
it is being updated later with a new value. The initialization is redundant
and can be removed.
Link: https://lore.kernel.org/r/20200722154404.959267-1-colin.king@canonical.com
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Unused value")
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index ab671cdd4cfb..b7d1b1ea185d 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -427,7 +427,7 @@ out_err: static int sas_expander_discover(struct domain_device *dev) { struct expander_device *ex = &dev->ex_dev; - int res = -ENOMEM; + int res; ex->ex_phy = kcalloc(ex->num_phys, sizeof(*ex->ex_phy), GFP_KERNEL); if (!ex->ex_phy) |