]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmicro: handle clk_prepare() failure during init
authorAnirudh Rayabharam <mail@anirudhrb.com>
Mon, 3 May 2021 11:56:48 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:33:18 +0000 (17:33 +0200)
commitb3127777ec692473afa27e5267367cf9905c1809
tree48874ffa7fd2ac97dc4bb85e5e8f0933d2d8511f
parent6ec06340bd7da886e61a308e1cd04ed36b447adc
net: stmicro: handle clk_prepare() failure during init

In case clk_prepare() fails, capture and propagate the error code up the
stack. If regulator_enable() was called earlier, properly unwind it by
calling regulator_disable().

Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-22-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c