From: Chengguang Xu <cgxu...@gmx.com> Date: Tue, 26 Jun 2018 09:16:31 +0800
> 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 <cgxu...@gmx.com> > Acked-by: Jakub Kicinski <jakub.kicin...@netronome.com> > --- > v2: > - Add more information to patch subject and commit log. I guess the: if (x < 0 || x < sizeof(foo)) better self-documents the situation, but this patch is fine too so I have applied it. Thanks.