summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-07-22 16:44:04 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-07-24 22:09:56 -0400
commit55eb809f5e1c6d2a57e4c24a574fe09065e62534 (patch)
treec96fc05e3c6438f7a06d87ea9a2f3fd56973ee83 /drivers/scsi/libsas
parent386533796574bcdfe25ef3b8c520bc5f3a9d7c89 (diff)
downloadlinux-55eb809f5e1c6d2a57e4c24a574fe09065e62534.tar.bz2
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.c2
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)