]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 08:28:43 +0000 (10:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 08:28:43 +0000 (10:28 +0200)
added patches:
asoc-soc-compress-change-the-check-for-codec_dai.patch
staging-mt7621-dts-fix-pinctrl-0-items-to-be-size-1-items-on-ethernet.patch

queue-5.10/asoc-soc-compress-change-the-check-for-codec_dai.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/staging-mt7621-dts-fix-pinctrl-0-items-to-be-size-1-items-on-ethernet.patch [new file with mode: 0644]

diff --git a/queue-5.10/asoc-soc-compress-change-the-check-for-codec_dai.patch b/queue-5.10/asoc-soc-compress-change-the-check-for-codec_dai.patch
new file mode 100644 (file)
index 0000000..237deb4
--- /dev/null
@@ -0,0 +1,54 @@
+From ccb4214f7f2a8b75acf493f31128e464ee1a3536 Mon Sep 17 00:00:00 2001
+From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
+Date: Thu, 10 Mar 2022 11:00:41 +0800
+Subject: ASoC: soc-compress: Change the check for codec_dai
+
+From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
+
+commit ccb4214f7f2a8b75acf493f31128e464ee1a3536 upstream.
+
+It should be better to reverse the check on codec_dai
+and returned early in order to be easier to understand.
+
+Fixes: de2c6f98817f ("ASoC: soc-compress: prevent the potentially use of null pointer")
+Reported-by: kernel test robot <lkp@intel.com>
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
+Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
+Link: https://lore.kernel.org/r/20220310030041.1556323-1-jiasheng@iscas.ac.cn
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/soc-compress.c |   19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+--- a/sound/soc/soc-compress.c
++++ b/sound/soc/soc-compress.c
+@@ -766,16 +766,19 @@ int snd_soc_new_compress(struct snd_soc_
+               return -EINVAL;
+       }
+-      /* check client and interface hw capabilities */
+-      if (codec_dai) {
+-              if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
+-                  snd_soc_dai_stream_valid(cpu_dai,   SNDRV_PCM_STREAM_PLAYBACK))
+-                      playback = 1;
+-              if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
+-                  snd_soc_dai_stream_valid(cpu_dai,   SNDRV_PCM_STREAM_CAPTURE))
+-                      capture = 1;
++      if (!codec_dai) {
++              dev_err(rtd->card->dev, "Missing codec\n");
++              return -EINVAL;
+       }
++      /* check client and interface hw capabilities */
++      if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
++          snd_soc_dai_stream_valid(cpu_dai,   SNDRV_PCM_STREAM_PLAYBACK))
++              playback = 1;
++      if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
++          snd_soc_dai_stream_valid(cpu_dai,   SNDRV_PCM_STREAM_CAPTURE))
++              capture = 1;
++
+       /*
+        * Compress devices are unidirectional so only one of the directions
+        * should be set, check for that (xor)
index 2a959a4cb9e38738c3dfccce26254eafc917e8de..fab7bac563ff074a1a8bad692cb7097cd92ed336 100644 (file)
@@ -570,3 +570,5 @@ acpi-cppc-avoid-out-of-bounds-access-when-parsing-_cpc-data.patch
 platform-chrome-cros_ec_typec-check-for-ec-device.patch
 can-isotp-restore-accidentally-removed-msg_peek-feat.patch
 proc-bootconfig-add-null-pointer-check.patch
+staging-mt7621-dts-fix-pinctrl-0-items-to-be-size-1-items-on-ethernet.patch
+asoc-soc-compress-change-the-check-for-codec_dai.patch
diff --git a/queue-5.10/staging-mt7621-dts-fix-pinctrl-0-items-to-be-size-1-items-on-ethernet.patch b/queue-5.10/staging-mt7621-dts-fix-pinctrl-0-items-to-be-size-1-items-on-ethernet.patch
new file mode 100644 (file)
index 0000000..0def29b
--- /dev/null
@@ -0,0 +1,36 @@
+From 25e4f5220efead592c83200241e098e757d37e1f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
+Date: Tue, 15 Feb 2022 11:17:24 +0300
+Subject: staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Arınç ÜNAL <arinc.unal@arinc9.com>
+
+commit 25e4f5220efead592c83200241e098e757d37e1f upstream.
+
+Fix pinctrl-0 items under the ethernet node to be size-1 items.
+Current notation would be used on specifications with non-zero cells.
+
+Fixes: 0a93c0d75809 ("staging: mt7621-dts: fix pinctrl properties for ethernet")
+Reported-by: Sander Vanheule <sander@svanheule.net>
+Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
+Link: https://lore.kernel.org/r/20220215081725.3463-1-arinc.unal@arinc9.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/mt7621-dts/mt7621.dtsi |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/mt7621-dts/mt7621.dtsi
++++ b/drivers/staging/mt7621-dts/mt7621.dtsi
+@@ -413,7 +413,7 @@
+               mediatek,ethsys = <&ethsys>;
+               pinctrl-names = "default";
+-              pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
++              pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>;
+               gmac0: mac@0 {
+                       compatible = "mediatek,eth-mac";