aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aquantia
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-11-13 21:31:58 +0300
committerDavid S. Miller <davem@davemloft.net>2019-11-13 14:29:28 -0800
commitd41378713eef6a7d9d9c30cb9a6181ad72f69596 (patch)
tree873d3d6556360298d97794a90a2c4dba7f91791c /drivers/net/ethernet/aquantia
parentbnxt_en: Fix array overrun in bnxt_fill_l2_rewrite_fields(). (diff)
downloadlinux-dev-d41378713eef6a7d9d9c30cb9a6181ad72f69596.tar.xz
linux-dev-d41378713eef6a7d9d9c30cb9a6181ad72f69596.zip
net: atlantic: Signedness bug in aq_vec_isr_legacy()
irqreturn_t type is an enum and in this context it's unsigned, so "err" can't be irqreturn_t or it breaks the error handling. In fact the "err" variable is only used to store integers (never irqreturn_t) so it should be declared as int. I removed the initialization because it's not required. Using a bogus initializer turns off GCC's uninitialized variable warnings. Secondly, there is a GCC warning about unused assignments and we would like to enable that feature eventually so we have been trying to remove these unnecessary initializers. Fixes: 7b0c342f1f67 ("net: atlantic: code style cleanup") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_vec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_vec.c b/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
index 6e19e27b6200..f40a427970dc 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
@@ -307,8 +307,8 @@ err_exit:
irqreturn_t aq_vec_isr_legacy(int irq, void *private)
{
struct aq_vec_s *self = private;
- irqreturn_t err = 0;
u64 irq_mask = 0U;
+ int err;
if (!self)
return IRQ_NONE;