niu: Fix missing unwind goto in niu_alloc_channels()
stable inclusion from stable-v5.10.178 commit 8a1fdb35459d5738cd362c8bb33c2ba743c29c17 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8D927 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8a1fdb35459d5738cd362c8bb33c2ba743c29c17 -------------------------------- [ Upstream commit 8ce07be7 ] Smatch reports: drivers/net/ethernet/sun/niu.c:4525 niu_alloc_channels() warn: missing unwind goto? If niu_rbr_fill() fails, then we are directly returning 'err' without freeing the channels. Fix this by changing direct return to a goto 'out_err'. Fixes: a3138df9 ("[NIU]: Add Sun Neptune ethernet driver.") Signed-off-by:Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by:
Simon Horman <simon.horman@corigine.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment