scsi: pm80xx: Initialize variable used as return status

In pm8001_task_exec(), if the PHY is down, then we return the current value
of 'rc'. We need to make sure it's initialized.

Link: https://lore.kernel.org/r/20191114100910.6153-4-deepak.ukey@microchip.com
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: John Sperbeck <jsperbeck@google.com>
Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
John Sperbeck 2019-11-14 15:39:00 +05:30 committed by Martin K. Petersen
parent e703977b50
commit cef1538456
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ static int pm8001_task_exec(struct sas_task *task,
struct pm8001_port *port = NULL;
struct sas_task *t = task;
struct pm8001_ccb_info *ccb;
u32 tag = 0xdeadbeef, rc, n_elem = 0;
u32 tag = 0xdeadbeef, rc = 0, n_elem = 0;
unsigned long flags = 0;
if (!dev->port) {