diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-03-27 23:06:50 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-29 23:16:15 -0400 |
commit | 8dc60252968178a132898ea2e1dc7a8e9a05e635 (patch) | |
tree | c4b4695d6a453fa23d86041873cf4043aed757b9 | |
parent | fe515ac827689d6f71d967c8e300a59cfeded42b (diff) |
scsi: qedi: Remove redundant assignment to variable err
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.
Link: https://lore.kernel.org/r/20210327230650.25803-1-colin.king@canonical.com
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/qedi/qedi_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 47ad64b06623..faf77808a3a7 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; |