kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: 3w-xxx: Remove redundant initialization of variable retval
@ 2021-10-13 18:28 Colin King
  2021-10-17  2:29 ` Martin K. Petersen
  2021-10-21  3:42 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-10-13 18:28 UTC (permalink / raw)
  To: Adam Radford, James E . J . Bottomley, linux-scsi
  Cc: kernel-janitors, linux-kernel

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

The variable retvasl is being initialized with a value that is never
read, it is being updated immediately afterwards. The assignment is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/3w-xxxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 4ee485ab2714..e2f8a7a95d9b 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2252,7 +2252,7 @@ static int tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
 {
 	struct Scsi_Host *host = NULL;
 	TW_Device_Extension *tw_dev;
-	int retval = -ENODEV;
+	int retval;
 
 	retval = pci_enable_device(pdev);
 	if (retval) {
-- 
2.32.0


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

* Re: [PATCH] scsi: 3w-xxx: Remove redundant initialization of variable retval
  2021-10-13 18:28 [PATCH] scsi: 3w-xxx: Remove redundant initialization of variable retval Colin King
@ 2021-10-17  2:29 ` Martin K. Petersen
  2021-10-21  3:42 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-10-17  2:29 UTC (permalink / raw)
  To: Colin King
  Cc: Adam Radford, James E . J . Bottomley, linux-scsi,
	kernel-janitors, linux-kernel


Colin,

> The variable retvasl is being initialized with a value that is never
> read, it is being updated immediately afterwards. The assignment is
> redundant and can be removed.

Applied to 5.16/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: 3w-xxx: Remove redundant initialization of variable retval
  2021-10-13 18:28 [PATCH] scsi: 3w-xxx: Remove redundant initialization of variable retval Colin King
  2021-10-17  2:29 ` Martin K. Petersen
@ 2021-10-21  3:42 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-10-21  3:42 UTC (permalink / raw)
  To: Colin King, James E . J . Bottomley, Adam Radford, linux-scsi
  Cc: Martin K . Petersen, linux-kernel, kernel-janitors

On Wed, 13 Oct 2021 19:28:34 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable retvasl is being initialized with a value that is never
> read, it is being updated immediately afterwards. The assignment is
> redundant and can be removed.
> 
> 
> [...]

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: 3w-xxx: Remove redundant initialization of variable retval
      https://git.kernel.org/mkp/scsi/c/8ecfb16c9be2

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-10-21  3:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 18:28 [PATCH] scsi: 3w-xxx: Remove redundant initialization of variable retval Colin King
2021-10-17  2:29 ` Martin K. Petersen
2021-10-21  3:42 ` Martin K. Petersen

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).