[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR18MB29984F8A199AF8581CC88F37D87D9@BYAPR18MB2998.namprd18.prod.outlook.com>
Date: Tue, 30 Mar 2021 10:08:24 +0000
From: Manish Rangankar <mrangankar@...vell.com>
To: Colin King <colin.king@...onical.com>,
Nilesh Javali <njavali@...vell.com>,
GR-QLogic-Storage-Upstream <GR-QLogic-Storage-Upstream@...vell.com>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] [PATCH] scsi: qedi: emove redundant assignment to variable
err
> -----Original Message-----
> From: Colin King <colin.king@...onical.com>
> Sent: Sunday, March 28, 2021 4:37 AM
> To: Nilesh Javali <njavali@...vell.com>; Manish Rangankar
> <mrangankar@...vell.com>; GR-QLogic-Storage-Upstream <GR-QLogic-
> Storage-Upstream@...vell.com>; James E . J . Bottomley
> <jejb@...ux.ibm.com>; Martin K . Petersen <martin.petersen@...cle.com>;
> linux-scsi@...r.kernel.org
> Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [EXT] [PATCH] scsi: qedi: emove redundant assignment to variable err
>
> External Email
>
> ----------------------------------------------------------------------
> From: Colin Ian King <colin.king@...onical.com>
>
> variable err is assigned -ENOMEM followed by an error return path via label
> err_udev that does not access the variable and returns with the -ENOMEM error
> return code. The assignment to err is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/scsi/qedi/qedi_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index
> 69c5b5ee2169..2455d1448a7e 100644
> --- a/drivers/scsi/qedi/qedi_main.c
> +++ b/drivers/scsi/qedi/qedi_main.c
> @@ -276,10 +276,8 @@ static int qedi_alloc_uio_rings(struct qedi_ctx *qedi)
> }
>
> udev = kzalloc(sizeof(*udev), GFP_KERNEL);
> - if (!udev) {
> - rc = -ENOMEM;
> + if (!udev)
> goto err_udev;
> - }
>
> udev->uio_dev = -1;
>
> --
> 2.30.2
Thanks,
Acked-by: Manish Rangankar <mrangankar@...vell.com>
Powered by blists - more mailing lists