]> git.baikalelectronics.ru Git - kernel.git/commit
net: atlantic: Signedness bug in aq_vec_isr_legacy()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Nov 2019 18:31:58 +0000 (21:31 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Nov 2019 22:29:28 +0000 (14:29 -0800)
commit6f619e99742e2263343f5d20cdde18fd0e38e5ed
tree873d3d6556360298d97794a90a2c4dba7f91791c
parentf89ec7b82be3f75d0bc59b26faf8dbca410d9465
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: 86b0fca30d9d ("net: atlantic: code style cleanup")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_vec.c