Commit 3a2d1efa authored by Deepak R Varma's avatar Deepak R Varma Committed by Martin K. Petersen
Browse files

scsi: ipr: Make ipr_probe_ioa_part2() return void

Convert function ipr_probe_ioa_part2() to return void instead of int since
the current implementation always returns 0 to the caller.  The
transformation also eliminates the dead code when calling
ipr_probe_ioa_part2() function.  Issue identified using returnvar
Coccinelle semantic patch.

Link: https://lore.kernel.org/r/Y7rvQyMOGcPKPTv8@ubun2204.myguest.virtualbox.org


Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 26a02d97
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -9500,11 +9500,10 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev,
 * This function takes care of initilizing the adapter to the point
 * where it can accept new commands.
 * Return value:
 * 	0 on success / -EIO on failure
 *     none
 **/
static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
static void ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
{
	int rc = 0;
	unsigned long host_lock_flags = 0;

	ENTER;
@@ -9520,7 +9519,6 @@ static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
	spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags);

	LEAVE;
	return rc;
}

/**
@@ -10563,12 +10561,7 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
		return rc;

	ioa_cfg = pci_get_drvdata(pdev);
	rc = ipr_probe_ioa_part2(ioa_cfg);

	if (rc) {
		__ipr_remove(pdev);
		return rc;
	}
	ipr_probe_ioa_part2(ioa_cfg);

	rc = scsi_add_host(ioa_cfg->host, &pdev->dev);