Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1659305
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] i40evf: remove redundant null check on key |
| Date | 2017-06-07 02:00 +0200 |
| Message-ID | <tPwyd-7dr-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com>
key has previously been null checked so the subsequent null check
is redundant as key can never be null at that point, so remove it.
Detected by CoverityScan, CID#1357164 ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index 9bb2cc7dd4e4..838e57c6e176 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -732,9 +732,7 @@ static int i40evf_set_rxfh(struct net_device *netdev, const u32 *indir,
if (!indir)
return 0;
- if (key) {
- memcpy(adapter->rss_key, key, adapter->rss_key_size);
- }
+ memcpy(adapter->rss_key, key, adapter->rss_key_size);
/* Each 32 bits pointed by 'indir' is stored with a lut entry */
for (i = 0; i < adapter->rss_lut_size; i++)
--
2.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] i40evf: remove redundant null check on key Colin King <colin.king@canonical.com> - 2017-06-07 02:00 +0200
csiph-web