kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt7601u: Remove redundant initialization of variable ret
@ 2021-10-07 23:41 Colin King
  2021-10-08  2:14 ` Jakub Kicinski
  2021-10-13  6:21 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-10-07 23:41 UTC (permalink / raw)
  To: Jakub Kicinski, Kalle Valo, David S . Miller, Matthias Brugger,
	linux-wireless, netdev, linux-arm-kernel, linux-mediatek
  Cc: kernel-janitors, linux-kernel

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

The variable ret is being initialized with a value that is never read,
it is assigned later on with a different value. The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/mediatek/mt7601u/dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c
index ed78d2cb35e3..457147394edc 100644
--- a/drivers/net/wireless/mediatek/mt7601u/dma.c
+++ b/drivers/net/wireless/mediatek/mt7601u/dma.c
@@ -515,7 +515,7 @@ static int mt7601u_alloc_tx(struct mt7601u_dev *dev)
 
 int mt7601u_dma_init(struct mt7601u_dev *dev)
 {
-	int ret = -ENOMEM;
+	int ret;
 
 	tasklet_setup(&dev->tx_tasklet, mt7601u_tx_tasklet);
 	tasklet_setup(&dev->rx_tasklet, mt7601u_rx_tasklet);
-- 
2.32.0


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

* Re: [PATCH] mt7601u: Remove redundant initialization of variable ret
  2021-10-07 23:41 [PATCH] mt7601u: Remove redundant initialization of variable ret Colin King
@ 2021-10-08  2:14 ` Jakub Kicinski
  2021-10-13  6:21 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-10-08  2:14 UTC (permalink / raw)
  To: Colin King
  Cc: Kalle Valo, David S . Miller, Matthias Brugger, linux-wireless,
	netdev, linux-arm-kernel, linux-mediatek, kernel-janitors,
	linux-kernel

On Fri,  8 Oct 2021 00:41:53 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being initialized with a value that is never read,
> it is assigned later on with a different value. The initialization is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Jakub Kicinski <kubakici@wp.pl>

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

* Re: [PATCH] mt7601u: Remove redundant initialization of variable ret
  2021-10-07 23:41 [PATCH] mt7601u: Remove redundant initialization of variable ret Colin King
  2021-10-08  2:14 ` Jakub Kicinski
@ 2021-10-13  6:21 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-10-13  6:21 UTC (permalink / raw)
  To: Colin King
  Cc: Jakub Kicinski, David S . Miller, Matthias Brugger,
	linux-wireless, netdev, linux-arm-kernel, linux-mediatek,
	kernel-janitors, linux-kernel

Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being initialized with a value that is never read,
> it is assigned later on with a different value. The initialization is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Jakub Kicinski <kubakici@wp.pl>

Patch applied to wireless-drivers-next.git, thanks.

3e4beec5e679 mt7601u: Remove redundant initialization of variable ret

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211007234153.31222-1-colin.king@canonical.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 23:41 [PATCH] mt7601u: Remove redundant initialization of variable ret Colin King
2021-10-08  2:14 ` Jakub Kicinski
2021-10-13  6:21 ` Kalle Valo

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