--- /dev/null
+From 596143e3aec35c93508d6b7a05ddc999ee209b61 Mon Sep 17 00:00:00 2001
+From: Jackie Liu <liuyun01@kylinos.cn>
+Date: Mon, 23 Aug 2021 17:25:26 +0800
+Subject: acpi/arm64: fix next_platform_timer() section mismatch error
+
+From: Jackie Liu <liuyun01@kylinos.cn>
+
+commit 596143e3aec35c93508d6b7a05ddc999ee209b61 upstream.
+
+Fix modpost Section mismatch error in next_platform_timer().
+
+ [...]
+ WARNING: modpost: vmlinux.o(.text.unlikely+0x26e60): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
+ The function next_platform_timer() references
+ the variable __initdata acpi_gtdt_desc.
+ This is often because next_platform_timer lacks a __initdata
+ annotation or the annotation of acpi_gtdt_desc is wrong.
+
+ WARNING: modpost: vmlinux.o(.text.unlikely+0x26e64): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc
+ The function next_platform_timer() references
+ the variable __initdata acpi_gtdt_desc.
+ This is often because next_platform_timer lacks a __initdata
+ annotation or the annotation of acpi_gtdt_desc is wrong.
+
+ ERROR: modpost: Section mismatches detected.
+ Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
+ make[1]: *** [scripts/Makefile.modpost:59: vmlinux.symvers] Error 1
+ make[1]: *** Deleting file 'vmlinux.symvers'
+ make: *** [Makefile:1176: vmlinux] Error 2
+ [...]
+
+Fixes: a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")
+Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
+Acked-by: Hanjun Guo <guohanjun@huawei.com>
+Link: https://lore.kernel.org/r/20210823092526.2407526-1-liu.yun@linux.dev
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/arm64/gtdt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/acpi/arm64/gtdt.c
++++ b/drivers/acpi/arm64/gtdt.c
+@@ -39,7 +39,7 @@ struct acpi_gtdt_descriptor {
+
+ static struct acpi_gtdt_descriptor acpi_gtdt_desc __initdata;
+
+-static inline void *next_platform_timer(void *platform_timer)
++static inline __init void *next_platform_timer(void *platform_timer)
+ {
+ struct acpi_gtdt_header *gh = platform_timer;
+
--- /dev/null
+From c8f01ffc83923a91e8087aaa077de13354a7aa59 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Fri, 1 Oct 2021 15:34:09 +0300
+Subject: drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit c8f01ffc83923a91e8087aaa077de13354a7aa59 upstream.
+
+This disables a lock which wasn't enabled and it does not disable
+the first lock in the array.
+
+Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20211001123409.GG2283@kili
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
++++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
+@@ -442,7 +442,7 @@ static int dsi_bus_clk_enable(struct msm
+
+ return 0;
+ err:
+- for (; i > 0; i--)
++ while (--i >= 0)
+ clk_disable_unprepare(msm_host->bus_clks[i]);
+
+ return ret;
--- /dev/null
+From 2133c4fc8e1348dcb752f267a143fe2254613b34 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Wed, 29 Sep 2021 13:18:57 +0100
+Subject: drm/msm: Fix null pointer dereference on pointer edp
+
+From: Colin Ian King <colin.king@canonical.com>
+
+commit 2133c4fc8e1348dcb752f267a143fe2254613b34 upstream.
+
+The initialization of pointer dev dereferences pointer edp before
+edp is null checked, so there is a potential null pointer deference
+issue. Fix this by only dereferencing edp after edp has been null
+checked.
+
+Addresses-Coverity: ("Dereference before null check")
+Fixes: ab5b0107ccf3 ("drm/msm: Initial add eDP support in msm drm driver (v5)")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20210929121857.213922-1-colin.king@canonical.com
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/msm/edp/edp_ctrl.c
++++ b/drivers/gpu/drm/msm/edp/edp_ctrl.c
+@@ -1090,7 +1090,7 @@ void msm_edp_ctrl_power(struct edp_ctrl
+ int msm_edp_ctrl_init(struct msm_edp *edp)
+ {
+ struct edp_ctrl *ctrl = NULL;
+- struct device *dev = &edp->pdev->dev;
++ struct device *dev;
+ int ret;
+
+ if (!edp) {
+@@ -1098,6 +1098,7 @@ int msm_edp_ctrl_init(struct msm_edp *ed
+ return -EINVAL;
+ }
+
++ dev = &edp->pdev->dev;
+ ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL);
+ if (!ctrl)
+ return -ENOMEM;
--- /dev/null
+From 291c932fc3692e4d211a445ba8aa35663831bac7 Mon Sep 17 00:00:00 2001
+From: Ziyang Xuan <william.xuanziyang@huawei.com>
+Date: Wed, 13 Oct 2021 15:50:32 +0800
+Subject: NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
+
+From: Ziyang Xuan <william.xuanziyang@huawei.com>
+
+commit 291c932fc3692e4d211a445ba8aa35663831bac7 upstream.
+
+'skb' is allocated in digital_in_send_sdd_req(), but not free when
+digital_in_send_cmd() failed, which will cause memory leak. Fix it
+by freeing 'skb' if digital_in_send_cmd() return failed.
+
+Fixes: 2c66daecc409 ("NFC Digital: Add NFC-A technology support")
+Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/nfc/digital_technology.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/net/nfc/digital_technology.c
++++ b/net/nfc/digital_technology.c
+@@ -474,8 +474,12 @@ static int digital_in_send_sdd_req(struc
+ skb_put_u8(skb, sel_cmd);
+ skb_put_u8(skb, DIGITAL_SDD_REQ_SEL_PAR);
+
+- return digital_in_send_cmd(ddev, skb, 30, digital_in_recv_sdd_res,
+- target);
++ rc = digital_in_send_cmd(ddev, skb, 30, digital_in_recv_sdd_res,
++ target);
++ if (rc)
++ kfree_skb(skb);
++
++ return rc;
+ }
+
+ static void digital_in_recv_sens_res(struct nfc_digital_dev *ddev, void *arg,
--- /dev/null
+From 58e7dcc9ca29c14e44267a4d0ea61e3229124907 Mon Sep 17 00:00:00 2001
+From: Ziyang Xuan <william.xuanziyang@huawei.com>
+Date: Wed, 13 Oct 2021 15:50:12 +0800
+Subject: NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
+
+From: Ziyang Xuan <william.xuanziyang@huawei.com>
+
+commit 58e7dcc9ca29c14e44267a4d0ea61e3229124907 upstream.
+
+'params' is allocated in digital_tg_listen_mdaa(), but not free when
+digital_send_cmd() failed, which will cause memory leak. Fix it by
+freeing 'params' if digital_send_cmd() return failed.
+
+Fixes: 1c7a4c24fbfd ("NFC Digital: Add target NFC-DEP support")
+Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/nfc/digital_core.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/net/nfc/digital_core.c
++++ b/net/nfc/digital_core.c
+@@ -286,6 +286,7 @@ int digital_tg_configure_hw(struct nfc_d
+ static int digital_tg_listen_mdaa(struct nfc_digital_dev *ddev, u8 rf_tech)
+ {
+ struct digital_tg_mdaa_params *params;
++ int rc;
+
+ params = kzalloc(sizeof(*params), GFP_KERNEL);
+ if (!params)
+@@ -300,8 +301,12 @@ static int digital_tg_listen_mdaa(struct
+ get_random_bytes(params->nfcid2 + 2, NFC_NFCID2_MAXSIZE - 2);
+ params->sc = DIGITAL_SENSF_FELICA_SC;
+
+- return digital_send_cmd(ddev, DIGITAL_CMD_TG_LISTEN_MDAA, NULL, params,
+- 500, digital_tg_recv_atr_req, NULL);
++ rc = digital_send_cmd(ddev, DIGITAL_CMD_TG_LISTEN_MDAA, NULL, params,
++ 500, digital_tg_recv_atr_req, NULL);
++ if (rc)
++ kfree(params);
++
++ return rc;
+ }
+
+ static int digital_tg_listen_md(struct nfc_digital_dev *ddev, u8 rf_tech)
--- /dev/null
+From 0911ab31896f0e908540746414a77dd63912748d Mon Sep 17 00:00:00 2001
+From: Ziyang Xuan <william.xuanziyang@huawei.com>
+Date: Wed, 13 Oct 2021 11:49:32 +0800
+Subject: nfc: fix error handling of nfc_proto_register()
+
+From: Ziyang Xuan <william.xuanziyang@huawei.com>
+
+commit 0911ab31896f0e908540746414a77dd63912748d upstream.
+
+When nfc proto id is using, nfc_proto_register() return -EBUSY error
+code, but forgot to unregister proto. Fix it by adding proto_unregister()
+in the error handling case.
+
+Fixes: c7fe3b52c128 ("NFC: add NFC socket family")
+Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+Link: https://lore.kernel.org/r/20211013034932.2833737-1-william.xuanziyang@huawei.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/nfc/af_nfc.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/net/nfc/af_nfc.c
++++ b/net/nfc/af_nfc.c
+@@ -72,6 +72,9 @@ int nfc_proto_register(const struct nfc_
+ proto_tab[nfc_proto->id] = nfc_proto;
+ write_unlock(&proto_tab_lock);
+
++ if (rc)
++ proto_unregister(nfc_proto->proto);
++
+ return rc;
+ }
+ EXPORT_SYMBOL(nfc_proto_register);
--- /dev/null
+From 013923477cb311293df9079332cf8b806ed0e6f2 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 6 Oct 2021 10:34:19 +0300
+Subject: pata_legacy: fix a couple uninitialized variable bugs
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 013923477cb311293df9079332cf8b806ed0e6f2 upstream.
+
+The last byte of "pad" is used without being initialized.
+
+Fixes: 55dba3120fbc ("libata: update ->data_xfer hook for ATAPI")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/ata/pata_legacy.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/ata/pata_legacy.c
++++ b/drivers/ata/pata_legacy.c
+@@ -329,7 +329,8 @@ static unsigned int pdc_data_xfer_vlb(st
+ iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
+
+ if (unlikely(slop)) {
+- __le32 pad;
++ __le32 pad = 0;
++
+ if (rw == READ) {
+ pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
+ memcpy(buf + buflen - slop, &pad, slop);
+@@ -719,7 +720,8 @@ static unsigned int vlb32_data_xfer(stru
+ ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
+
+ if (unlikely(slop)) {
+- __le32 pad;
++ __le32 pad = 0;
++
+ if (rw == WRITE) {
+ memcpy(&pad, buf + buflen - slop, slop);
+ iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr);
--- /dev/null
+From a5a14ea7b4e55604acb0dc9d88fdb4cb6945bc77 Mon Sep 17 00:00:00 2001
+From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
+Date: Sat, 9 Oct 2021 16:09:26 +0800
+Subject: qed: Fix missing error code in qed_slowpath_start()
+
+From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
+
+commit a5a14ea7b4e55604acb0dc9d88fdb4cb6945bc77 upstream.
+
+The error code is missing in this code scenario, add the error code
+'-EINVAL' to the return value 'rc'.
+
+Eliminate the follow smatch warning:
+
+drivers/net/ethernet/qlogic/qed/qed_main.c:1298 qed_slowpath_start()
+warn: missing error code 'rc'.
+
+Reported-by: Abaci Robot <abaci@linux.alibaba.com>
+Fixes: d51e4af5c209 ("qed: aRFS infrastructure support")
+Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
++++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
+@@ -998,6 +998,7 @@ static int qed_slowpath_start(struct qed
+ } else {
+ DP_NOTICE(cdev,
+ "Failed to acquire PTT for aRFS\n");
++ rc = -EINVAL;
+ goto err;
+ }
+ }
--- /dev/null
+From 9973a43012b6ad1720dbc4d5faf5302c28635b8c Mon Sep 17 00:00:00 2001
+From: Vegard Nossum <vegard.nossum@oracle.com>
+Date: Mon, 11 Oct 2021 17:22:49 +0200
+Subject: r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
+
+From: Vegard Nossum <vegard.nossum@oracle.com>
+
+commit 9973a43012b6ad1720dbc4d5faf5302c28635b8c upstream.
+
+Fix the following build/link errors by adding a dependency on
+CRYPTO, CRYPTO_HASH, CRYPTO_SHA256 and CRC32:
+
+ ld: drivers/net/usb/r8152.o: in function `rtl8152_fw_verify_checksum':
+ r8152.c:(.text+0x2b2a): undefined reference to `crypto_alloc_shash'
+ ld: r8152.c:(.text+0x2bed): undefined reference to `crypto_shash_digest'
+ ld: r8152.c:(.text+0x2c50): undefined reference to `crypto_destroy_tfm'
+ ld: drivers/net/usb/r8152.o: in function `_rtl8152_set_rx_mode':
+ r8152.c:(.text+0xdcb0): undefined reference to `crc32_le'
+
+Fixes: 9370f2d05a2a1 ("r8152: support request_firmware for RTL8153")
+Fixes: ac718b69301c7 ("net/usb: new driver for RTL8152")
+Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/Kconfig | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/usb/Kconfig
++++ b/drivers/net/usb/Kconfig
+@@ -98,6 +98,10 @@ config USB_RTL8150
+ config USB_RTL8152
+ tristate "Realtek RTL8152/RTL8153 Based USB Ethernet Adapters"
+ select MII
++ select CRC32
++ select CRYPTO
++ select CRYPTO_HASH
++ select CRYPTO_SHA256
+ help
+ This option adds support for Realtek RTL8152 based USB 2.0
+ 10/100 Ethernet adapters and RTL8153 based USB 3.0 10/100/1000
net-korina-select-crc32.patch
net-encx24j600-check-error-in-devm_regmap_init_encx24j600.patch
ethernet-s2io-fix-setting-mac-address-during-resume.patch
+nfc-fix-error-handling-of-nfc_proto_register.patch
+nfc-digital-fix-possible-memory-leak-in-digital_tg_listen_mdaa.patch
+nfc-digital-fix-possible-memory-leak-in-digital_in_send_sdd_req.patch
+pata_legacy-fix-a-couple-uninitialized-variable-bugs.patch
+drm-msm-fix-null-pointer-dereference-on-pointer-edp.patch
+drm-msm-dsi-fix-off-by-one-in-dsi_bus_clk_enable-error-handling.patch
+acpi-arm64-fix-next_platform_timer-section-mismatch-error.patch
+qed-fix-missing-error-code-in-qed_slowpath_start.patch
+r8152-select-crc32-and-crypto-crypto_hash-crypto_sha256.patch