diff mbox series

xen-blkfront: Remove redundant assignment to variable err

Message ID 20210806110601.11386-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit da20b58d5bbbb0d23ae9530992a37d0f0d1787a4
Headers show
Series xen-blkfront: Remove redundant assignment to variable err | expand

Commit Message

Colin King Aug. 6, 2021, 11:06 a.m. UTC
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(-)

Comments

Boris Ostrovsky Aug. 10, 2021, 1:28 a.m. UTC | #1
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>
Jens Axboe Aug. 10, 2021, 2:05 a.m. UTC | #2
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.
diff mbox series

Patch

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;