linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen-blkfront: Remove redundant assignment to variable err
@ 2021-08-06 11:06 Colin King
  2021-08-10  1:28 ` Boris Ostrovsky
  2021-08-10  2:05 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-08-06 11:06 UTC (permalink / raw)
  To: Boris Ostrovsky, Juergen Gross, Stefano Stabellini,
	Roger Pau Monné,
	Jens Axboe, xen-devel, linux-block
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable err is being assigned a value that is never read, the
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/block/xen-blkfront.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index d83fee21f6c5..715bfa8aca7f 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1092,7 +1092,6 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
 	err = xlbd_reserve_minors(minor, nr_minors);
 	if (err)
 		return err;
-	err = -ENODEV;
 
 	memset(&info->tag_set, 0, sizeof(info->tag_set));
 	info->tag_set.ops = &blkfront_mq_ops;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen-blkfront: Remove redundant assignment to variable err
  2021-08-06 11:06 [PATCH] xen-blkfront: Remove redundant assignment to variable err Colin King
@ 2021-08-10  1:28 ` Boris Ostrovsky
  2021-08-10  2:05 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2021-08-10  1:28 UTC (permalink / raw)
  To: Colin King, Juergen Gross, Stefano Stabellini,
	Roger Pau Monné,
	Jens Axboe, xen-devel, linux-block
  Cc: kernel-janitors, linux-kernel


On 8/6/21 7:06 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable err is being assigned a value that is never read, the
> assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen-blkfront: Remove redundant assignment to variable err
  2021-08-06 11:06 [PATCH] xen-blkfront: Remove redundant assignment to variable err Colin King
  2021-08-10  1:28 ` Boris Ostrovsky
@ 2021-08-10  2:05 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-08-10  2:05 UTC (permalink / raw)
  To: Colin King, Boris Ostrovsky, Juergen Gross, Stefano Stabellini,
	Roger Pau Monné,
	xen-devel, linux-block
  Cc: kernel-janitors, linux-kernel

On 8/6/21 5:06 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable err is being assigned a value that is never read, the
> assignment is redundant and can be removed.

Added for 5.15, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-10  2:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 11:06 [PATCH] xen-blkfront: Remove redundant assignment to variable err Colin King
2021-08-10  1:28 ` Boris Ostrovsky
2021-08-10  2:05 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).