]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 May 2026 07:47:02 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 May 2026 07:47:02 +0000 (09:47 +0200)
added patches:
media-dib8000-avoid-division-by-0-in-dib8000_set_dds.patch
media-i2c-imx412-assert-reset-gpio-during-probe.patch
spi-mtk-nor-fix-controller-deregistration.patch

queue-5.15/media-dib8000-avoid-division-by-0-in-dib8000_set_dds.patch [new file with mode: 0644]
queue-5.15/media-i2c-imx412-assert-reset-gpio-during-probe.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/spi-mtk-nor-fix-controller-deregistration.patch [new file with mode: 0644]

diff --git a/queue-5.15/media-dib8000-avoid-division-by-0-in-dib8000_set_dds.patch b/queue-5.15/media-dib8000-avoid-division-by-0-in-dib8000_set_dds.patch
new file mode 100644 (file)
index 0000000..88b8f57
--- /dev/null
@@ -0,0 +1,47 @@
+From dde3c37af95cd6fa301c4906f33d627bc9dd874c Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
+Date: Fri, 6 Feb 2026 17:22:26 +0300
+Subject: media: dib8000: avoid division by 0 in dib8000_set_dds()
+
+From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
+
+commit dde3c37af95cd6fa301c4906f33d627bc9dd874c upstream.
+
+In dib8000_set_dds(), 1 << 26 (67108864) divided by e.g. 1 apparently can't
+fit into 16-bit variable unit_khz_dds_val, being truncated to 0; this will
+cause division by 0 while calling dprintk() with debugging enabled (via the
+module parameter).  Use s32 instead of s16 to declare the variable, getting
+rid of the cast to u16 in the *else* branch as well...
+
+Found by Linux Verification Center (linuxtesting.org) with the Svace static
+analysis tool.
+
+Fixes: 173a64cb3fcf ("[media] dib8000: enhancement")
+Cc: stable@vger.kernel.org
+Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
+Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/dvb-frontends/dib8000.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/dvb-frontends/dib8000.c
++++ b/drivers/media/dvb-frontends/dib8000.c
+@@ -2694,7 +2694,7 @@ static void dib8000_viterbi_state(struct
+ static void dib8000_set_dds(struct dib8000_state *state, s32 offset_khz)
+ {
+-      s16 unit_khz_dds_val;
++      s32 unit_khz_dds_val;
+       u32 abs_offset_khz = abs(offset_khz);
+       u32 dds = state->cfg.pll->ifreq & 0x1ffffff;
+       u8 invert = !!(state->cfg.pll->ifreq & (1 << 25));
+@@ -2715,7 +2715,7 @@ static void dib8000_set_dds(struct dib80
+                       dds = (1<<26) - dds;
+       } else {
+               ratio = 2;
+-              unit_khz_dds_val = (u16) (67108864 / state->cfg.pll->internal);
++              unit_khz_dds_val = 67108864 / state->cfg.pll->internal;
+               if (offset_khz < 0)
+                       unit_khz_dds_val *= -1;
diff --git a/queue-5.15/media-i2c-imx412-assert-reset-gpio-during-probe.patch b/queue-5.15/media-i2c-imx412-assert-reset-gpio-during-probe.patch
new file mode 100644 (file)
index 0000000..d941b1f
--- /dev/null
@@ -0,0 +1,34 @@
+From 8467c5ff5acae28513bc1e0af535e06b41b04344 Mon Sep 17 00:00:00 2001
+From: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
+Date: Fri, 23 Jan 2026 17:19:55 +0800
+Subject: media: i2c: imx412: Assert reset GPIO during probe
+
+From: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
+
+commit 8467c5ff5acae28513bc1e0af535e06b41b04344 upstream.
+
+Assert the reset GPIO before first power up. This avoids a mismatch where
+the first power up (when the reset GPIO defaults deasserted) differs from
+subsequent cycles.
+
+Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
+Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/i2c/imx412.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/i2c/imx412.c
++++ b/drivers/media/i2c/imx412.c
+@@ -925,7 +925,7 @@ static int imx412_parse_hw_config(struct
+       /* Request optional reset pin */
+       imx412->reset_gpio = devm_gpiod_get_optional(imx412->dev, "reset",
+-                                                   GPIOD_OUT_LOW);
++                                                   GPIOD_OUT_HIGH);
+       if (IS_ERR(imx412->reset_gpio)) {
+               dev_err(imx412->dev, "failed to get reset gpio %ld\n",
+                       PTR_ERR(imx412->reset_gpio));
index eb65e0c484eefabc0be767fecf686e00cdb5e5f0..cf2dd0b96858576718f7562be9f6b48b29fb5a39 100644 (file)
@@ -367,3 +367,6 @@ media-rc-xbox_remote-heed-dma-restrictions.patch
 media-rc-streamzap-error-handling-in-probe.patch
 regulator-act8945a-fix-of-node-reference-imbalance.patch
 regulator-bd9571mwv-fix-of-node-reference-imbalance.patch
+media-dib8000-avoid-division-by-0-in-dib8000_set_dds.patch
+media-i2c-imx412-assert-reset-gpio-during-probe.patch
+spi-mtk-nor-fix-controller-deregistration.patch
diff --git a/queue-5.15/spi-mtk-nor-fix-controller-deregistration.patch b/queue-5.15/spi-mtk-nor-fix-controller-deregistration.patch
new file mode 100644 (file)
index 0000000..ebca6fa
--- /dev/null
@@ -0,0 +1,43 @@
+From 76336f24934621db286cabb20b483773ee01dcaa Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Fri, 10 Apr 2026 10:17:32 +0200
+Subject: spi: mtk-nor: fix controller deregistration
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 76336f24934621db286cabb20b483773ee01dcaa upstream.
+
+Make sure to deregister the controller before disabling underlying
+resources like clocks during driver unbind.
+
+Fixes: 881d1ee9fe81 ("spi: add support for mediatek spi-nor controller")
+Cc: stable@vger.kernel.org     # 5.7
+Cc: Chuanhong Guo <gch981213@gmail.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Link: https://patch.msgid.link/20260410081757.503099-3-johan@kernel.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/spi/spi-mtk-nor.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/spi/spi-mtk-nor.c
++++ b/drivers/spi/spi-mtk-nor.c
+@@ -849,7 +849,7 @@ static int mtk_nor_probe(struct platform
+       pm_runtime_enable(&pdev->dev);
+       pm_runtime_get_noresume(&pdev->dev);
+-      ret = devm_spi_register_controller(&pdev->dev, ctlr);
++      ret = spi_register_controller(ctlr);
+       if (ret < 0)
+               goto err_probe;
+@@ -875,6 +875,8 @@ static int mtk_nor_remove(struct platfor
+       struct spi_controller *ctlr = dev_get_drvdata(&pdev->dev);
+       struct mtk_nor *sp = spi_controller_get_devdata(ctlr);
++      spi_unregister_controller(ctlr);
++
+       pm_runtime_disable(&pdev->dev);
+       pm_runtime_set_suspended(&pdev->dev);
+       pm_runtime_dont_use_autosuspend(&pdev->dev);