Re: [PATCH][net-next] hinic: fix dereference of pointer hwdev before it is null checked

From: David Miller
Date: Sun Jun 23 2019 - 14:08:41 EST


From: Colin King <colin.king@xxxxxxxxxxxxx>
Date: Thu, 20 Jun 2019 14:27:51 +0100

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Currently pointer hwdev is dereferenced when assigning hwif before
> hwdev is null checked. Fix this by only derefencing hwdev after the
> null check.
>
> Addresses-Coverity: ("Dereference before null check")
> Fixes: 4fdc51bb4e92 ("hinic: add support for rss parameters with ethtool")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Applied.