Re: [PATCH] ipv4: nexthop: Fix deadcode issue by performing a proper NULL check
From: David Miller
Date: Mon Jun 01 2020 - 14:49:37 EST
From: patrickeigensatz@xxxxxxxxx
Date: Mon, 1 Jun 2020 13:12:01 +0200
> From: Patrick Eigensatz <patrickeigensatz@xxxxxxxxx>
>
> After allocating the spare nexthop group it should be tested for kzalloc()
> returning NULL, instead the already used nexthop group (which cannot be
> NULL at this point) had been tested so far.
>
> Additionally, if kzalloc() fails, return ERR_PTR(-ENOMEM) instead of NULL.
>
> Coverity-id: 1463885
> Reported-by: Coverity <scan-admin@xxxxxxxxxxxx>
> Signed-off-by: Patrick Eigensatz <patrickeigensatz@xxxxxxxxx>
Applied, thank you.