From: Sasha Levin Date: Sat, 18 Jan 2025 22:25:56 +0000 (-0500) Subject: Fixes for 5.4 X-Git-Tag: v6.1.126~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a535d67b3d5a14c5feec5a80eb8d91450bdaadfd;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/i2c-mux-demux-pinctrl-check-initial-mux-selection-to.patch b/queue-5.4/i2c-mux-demux-pinctrl-check-initial-mux-selection-to.patch new file mode 100644 index 0000000000..7f9fdcbb94 --- /dev/null +++ b/queue-5.4/i2c-mux-demux-pinctrl-check-initial-mux-selection-to.patch @@ -0,0 +1,37 @@ +From 763a77f08e8038cddb5033c3487813812339637e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 15 Jan 2025 08:29:45 +0100 +Subject: i2c: mux: demux-pinctrl: check initial mux selection, too + +From: Wolfram Sang + +[ Upstream commit ca89f73394daf92779ddaa37b42956f4953f3941 ] + +When misconfigured, the initial setup of the current mux channel can +fail, too. It must be checked as well. + +Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver") +Signed-off-by: Wolfram Sang +Signed-off-by: Sasha Levin +--- + drivers/i2c/muxes/i2c-demux-pinctrl.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c +index 45a3f7e7b3f68..cea057704c00c 100644 +--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c ++++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c +@@ -261,7 +261,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev) + pm_runtime_no_callbacks(&pdev->dev); + + /* switch to first parent as active master */ +- i2c_demux_activate_master(priv, 0); ++ err = i2c_demux_activate_master(priv, 0); ++ if (err) ++ goto err_rollback; + + err = device_create_file(&pdev->dev, &dev_attr_available_masters); + if (err) +-- +2.39.5 + diff --git a/queue-5.4/series b/queue-5.4/series index a32e951b4a..93094437e9 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -59,3 +59,4 @@ gtp-use-for_each_netdev_rcu-in-gtp_genl_dump_pdp.patch gtp-destroy-device-along-with-udp-socket-s-netns-dis.patch nfp-bpf-prevent-integer-overflow-in-nfp_bpf_event_ou.patch drm-v3d-ensure-job-pointer-is-set-to-null-after-job-.patch +i2c-mux-demux-pinctrl-check-initial-mux-selection-to.patch