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")
This commit is contained in:
parent
3865337965
commit
55eb809f5e
|
@ -427,7 +427,7 @@ out_err:
|
||||||
static int sas_expander_discover(struct domain_device *dev)
|
static int sas_expander_discover(struct domain_device *dev)
|
||||||
{
|
{
|
||||||
struct expander_device *ex = &dev->ex_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);
|
ex->ex_phy = kcalloc(ex->num_phys, sizeof(*ex->ex_phy), GFP_KERNEL);
|
||||||
if (!ex->ex_phy)
|
if (!ex->ex_phy)
|
||||||
|
|
Loading…
Reference in New Issue