aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2025-02-12 21:23:13 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2025-02-19 10:44:20 +0100
commit6c00b580d1c95ba9fe76c99307a16e5f47a214ba (patch)
tree0364f41a687ea43e7524c4b2a093b74e77e2f3f4
parentcan: c_can: Drop useless final probe failure message (diff)
downloadwireguard-linux-6c00b580d1c95ba9fe76c99307a16e5f47a214ba.tar.xz
wireguard-linux-6c00b580d1c95ba9fe76c99307a16e5f47a214ba.zip
can: c_can: Simplify handling syscon error path
Use error handling block instead of open-coding it in one of probe failure cases. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://patch.msgid.link/20250212-syscon-phandle-args-can-v2-2-ac9a1253396b@linaro.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--drivers/net/can/c_can/c_can_platform.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 8968b6288ac7..96d1225c41d0 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -324,10 +324,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
raminit->syscon = syscon_regmap_lookup_by_phandle(np,
"syscon-raminit");
if (IS_ERR(raminit->syscon)) {
- /* can fail with -EPROBE_DEFER */
ret = PTR_ERR(raminit->syscon);
- free_c_can_dev(dev);
- return ret;
+ goto exit_free_device;
}
if (of_property_read_u32_index(np, "syscon-raminit", 1,