net: dsa: fix value check in bcm_sf2_sw_probe()
authorYuanjun Gong <ruc_gongyuanjun@163.com>
Wed, 26 Jul 2023 17:05:06 +0000 (01:05 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 28 Jul 2023 03:02:54 +0000 (20:02 -0700)
commitdadc5b86cc9459581f37fe755b431adc399ea393
treea3ff846cf0724f62b6635c2e44688183af288c5a
parent4d50e50045aa46d9f3e578ed2edea9bd0a123d24
net: dsa: fix value check in bcm_sf2_sw_probe()

in bcm_sf2_sw_probe(), check the return value of clk_prepare_enable()
and return the error code if clk_prepare_enable() returns an
unexpected value.

Fixes: e9ec5c3bd238 ("net: dsa: bcm_sf2: request and handle clocks")
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230726170506.16547-1-ruc_gongyuanjun@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/bcm_sf2.c