]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop queue-5.4/leds-netxbig-add-missing-put_device-call-in-netxbig_.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 09:47:31 +0000 (10:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 09:47:31 +0000 (10:47 +0100)
queue-5.4/leds-netxbig-add-missing-put_device-call-in-netxbig_.patch [deleted file]
queue-5.4/series

diff --git a/queue-5.4/leds-netxbig-add-missing-put_device-call-in-netxbig_.patch b/queue-5.4/leds-netxbig-add-missing-put_device-call-in-netxbig_.patch
deleted file mode 100644 (file)
index 6e33602..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-From 751c2f6e336e9779748c95cd3252b2c183c2dff0 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 29 Oct 2020 17:23:05 +0800
-Subject: leds: netxbig: add missing put_device() call in
- netxbig_leds_get_of_pdata()
-
-From: Yu Kuai <yukuai3@huawei.com>
-
-[ Upstream commit 311066aa9ebcd6f1789c829da5039ca02f2dfe46 ]
-
-if of_find_device_by_node() succeed, netxbig_leds_get_of_pdata() doesn't
-have a corresponding put_device(). Thus add jump target to fix the
-exception handling for this function implementation.
-
-Fixes: 2976b1798909 ("leds: netxbig: add device tree binding")
-Signed-off-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/leds/leds-netxbig.c | 35 ++++++++++++++++++++++++-----------
- 1 file changed, 24 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/leds/leds-netxbig.c b/drivers/leds/leds-netxbig.c
-index 14ef4ccdda3a8..c8699454418df 100644
---- a/drivers/leds/leds-netxbig.c
-+++ b/drivers/leds/leds-netxbig.c
-@@ -430,31 +430,39 @@ static int netxbig_leds_get_of_pdata(struct device *dev,
-       gpio_ext = devm_kzalloc(dev, sizeof(*gpio_ext), GFP_KERNEL);
-       if (!gpio_ext) {
-               of_node_put(gpio_ext_np);
--              return -ENOMEM;
-+              ret = -ENOMEM;
-+              goto put_device;
-       }
-       ret = gpio_ext_get_of_pdata(dev, gpio_ext_np, gpio_ext);
-       of_node_put(gpio_ext_np);
-       if (ret)
--              return ret;
-+              goto put_device;
-       pdata->gpio_ext = gpio_ext;
-       /* Timers (optional) */
-       ret = of_property_count_u32_elems(np, "timers");
-       if (ret > 0) {
--              if (ret % 3)
--                      return -EINVAL;
-+              if (ret % 3) {
-+                      ret = -EINVAL;
-+                      goto put_device;
-+              }
-+
-               num_timers = ret / 3;
-               timers = devm_kcalloc(dev, num_timers, sizeof(*timers),
-                                     GFP_KERNEL);
--              if (!timers)
--                      return -ENOMEM;
-+              if (!timers) {
-+                      ret = -ENOMEM;
-+                      goto put_device;
-+              }
-               for (i = 0; i < num_timers; i++) {
-                       u32 tmp;
-                       of_property_read_u32_index(np, "timers", 3 * i,
-                                                  &timers[i].mode);
--                      if (timers[i].mode >= NETXBIG_LED_MODE_NUM)
--                              return -EINVAL;
-+                      if (timers[i].mode >= NETXBIG_LED_MODE_NUM) {
-+                              ret = -EINVAL;
-+                              goto put_device;
-+                      }
-                       of_property_read_u32_index(np, "timers",
-                                                  3 * i + 1, &tmp);
-                       timers[i].delay_on = tmp;
-@@ -470,12 +478,15 @@ static int netxbig_leds_get_of_pdata(struct device *dev,
-       num_leds = of_get_child_count(np);
-       if (!num_leds) {
-               dev_err(dev, "No LED subnodes found in DT\n");
--              return -ENODEV;
-+              ret = -ENODEV;
-+              goto put_device;
-       }
-       leds = devm_kcalloc(dev, num_leds, sizeof(*leds), GFP_KERNEL);
--      if (!leds)
--              return -ENOMEM;
-+      if (!leds) {
-+              ret = -ENOMEM;
-+              goto put_device;
-+      }
-       led = leds;
-       for_each_child_of_node(np, child) {
-@@ -556,6 +567,8 @@ static int netxbig_leds_get_of_pdata(struct device *dev,
- err_node_put:
-       of_node_put(child);
-+put_device:
-+      put_device(gpio_ext_dev);
-       return ret;
- }
--- 
-2.27.0
-
index 3c621099f93071dd90392999151597f02b681f7f..3b39939582f54905019a5066b7f64142b54bf53f 100644 (file)
@@ -163,7 +163,6 @@ qtnfmac-fix-error-return-code-in-qtnf_pcie_probe.patch
 rsi-fix-error-return-code-in-rsi_reset_card.patch
 cw1200-fix-missing-destroy_workqueue-on-error-in-cw1.patch
 dmaengine-mv_xor_v2-fix-error-return-code-in-mv_xor_.patch
-leds-netxbig-add-missing-put_device-call-in-netxbig_.patch
 arm64-tegra-fix-dt-binding-for-io-high-voltage-entry.patch
 media-siano-fix-memory-leak-of-debugfs-members-in-sm.patch
 platform-x86-mlx-platform-remove-psu-eeprom-from-def.patch