lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] scsi: ipr: Remove unneeded return variable
    Date
    This patch removes unneeded return variables, using only
    '0' instead.
    It fixes the following warning detected by coccinelle:
    ./drivers/scsi/ipr.c:9508:5-7: Unneeded variable: "rc". Return "0" on
    line 9524

    Reported-by: Abaci Robot <abaci@linux.alibaba.com>
    Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
    ---
    drivers/scsi/ipr.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
    index e451102..8eced7c 100644
    --- a/drivers/scsi/ipr.c
    +++ b/drivers/scsi/ipr.c
    @@ -9505,7 +9505,6 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev,
    **/
    static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
    {
    - int rc = 0;
    unsigned long host_lock_flags = 0;

    ENTER;
    @@ -9521,7 +9520,7 @@ 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;
    + return 0;
    }

    /**
    --
    1.8.3.1
    \
     
     \ /
      Last update: 2021-02-04 08:29    [W:2.959 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site