* [PATCH] nfc: st-nci: remove redundant assignment to variable r
@ 2019-07-02 13:16 Colin King
2019-07-02 19:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-07-02 13:16 UTC (permalink / raw)
To: Thomas Gleixner, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable r is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/nfc/st-nci/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c
index 67a685adfd44..55d600cd3861 100644
--- a/drivers/nfc/st-nci/i2c.c
+++ b/drivers/nfc/st-nci/i2c.c
@@ -72,7 +72,7 @@ static void st_nci_i2c_disable(void *phy_id)
*/
static int st_nci_i2c_write(void *phy_id, struct sk_buff *skb)
{
- int r = -1;
+ int r;
struct st_nci_i2c_phy *phy = phy_id;
struct i2c_client *client = phy->i2c_dev;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfc: st-nci: remove redundant assignment to variable r
2019-07-02 13:16 [PATCH] nfc: st-nci: remove redundant assignment to variable r Colin King
@ 2019-07-02 19:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-02 19:02 UTC (permalink / raw)
To: colin.king; +Cc: tglx, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 2 Jul 2019 14:16:42 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable r is being initialized with a value that is never
> read and it is being updated later with a new value. The
> initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-02 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 13:16 [PATCH] nfc: st-nci: remove redundant assignment to variable r Colin King
2019-07-02 19:02 ` David Miller
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).