Skip to content

Commit

Permalink
net: atlantic: Signedness bug in aq_vec_isr_legacy()
Browse files Browse the repository at this point in the history
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: 7b0c342 ("net: atlantic: code style cleanup")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 13, 2019
1 parent 3128aad commit d413787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/aquantia/atlantic/aq_vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ irqreturn_t aq_vec_isr(int irq, void *private)
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;
Expand Down

0 comments on commit d413787

Please sign in to comment.