nfp: cast sizeof() to int when comparing with error code
authorChengguang Xu <cgxu519@gmx.com>
Tue, 26 Jun 2018 01:16:31 +0000 (09:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Jun 2018 06:36:32 +0000 (15:36 +0900)
commit2d2595719a97c876f35b1e60e5768e58753b268c
tree5e6181ee6b05e5289bcb039d97a02063b9a7c9aa
parentf3c2c5ebd4d9f7074f2a685ad06ab618ca1a6a78
nfp: cast sizeof() to int when comparing with error code

sizeof() will return unsigned value so in the error check
negative error code will be always larger than sizeof().

Fixes: a0d8e02c35ff ("nfp: add support for reading nffw info")
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c