Patchwork [next] crypto: chtls: remove redundant assignment to cdev->ports

login
register
mail settings
Submitter Colin Ian King
Date April 6, 2018, 4:58 p.m.
Message ID <20180406165847.29310-1-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/10327237/
State Accepted
Delegated to: Herbert Xu
Headers show

Comments

Colin Ian King - April 6, 2018, 4:58 p.m.
From: Colin Ian King <colin.king@canonical.com>

There is a double assignment to cdev->ports, the first is redundant
as it is over-written so remove it.

Detected by CoverityScan, CID#1467432 ("Unused value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/crypto/chelsio/chtls/chtls_main.c | 1 -
 1 file changed, 1 deletion(-)
Herbert Xu - April 20, 2018, 4:51 p.m.
On Fri, Apr 06, 2018 at 05:58:47PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There is a double assignment to cdev->ports, the first is redundant
> as it is over-written so remove it.
> 
> Detected by CoverityScan, CID#1467432 ("Unused value")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied.  Thanks.

Patch

diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c b/drivers/crypto/chelsio/chtls/chtls_main.c
index 007c45c38fc7..984a53f19f8b 100644
--- a/drivers/crypto/chelsio/chtls/chtls_main.c
+++ b/drivers/crypto/chelsio/chtls/chtls_main.c
@@ -216,7 +216,6 @@  static void *chtls_uld_add(const struct cxgb4_lld_info *info)
 	cdev->lldi = lldi;
 	cdev->pdev = lldi->pdev;
 	cdev->tids = lldi->tids;
-	cdev->ports = (struct net_device **)(cdev + 1);
 	cdev->ports = lldi->ports;
 	cdev->mtus = lldi->mtus;
 	cdev->tids = lldi->tids;