]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 May 2013 02:26:47 +0000 (19:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 May 2013 02:26:47 +0000 (19:26 -0700)
added patches:
hwmon-fix-error-return-code-in-abituguru_probe.patch
media-mantis-fix-silly-crash-case.patch

queue-3.0/hwmon-fix-error-return-code-in-abituguru_probe.patch [new file with mode: 0644]
queue-3.0/media-mantis-fix-silly-crash-case.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/hwmon-fix-error-return-code-in-abituguru_probe.patch b/queue-3.0/hwmon-fix-error-return-code-in-abituguru_probe.patch
new file mode 100644 (file)
index 0000000..ba0a7a9
--- /dev/null
@@ -0,0 +1,47 @@
+From ecacb0b17c08fae89f65468727f0e4b8e91da4e1 Mon Sep 17 00:00:00 2001
+From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
+Date: Mon, 13 May 2013 14:01:43 +0800
+Subject: hwmon: fix error return code in abituguru_probe()
+
+From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
+
+commit ecacb0b17c08fae89f65468727f0e4b8e91da4e1 upstream.
+
+Fix to return a negative error code from the error handling
+case instead of 0, as done elsewhere in this function.
+
+Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/abituguru.c |   16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/drivers/hwmon/abituguru.c
++++ b/drivers/hwmon/abituguru.c
+@@ -1280,14 +1280,18 @@ static int __devinit abituguru_probe(str
+       pr_info("found Abit uGuru\n");
+       /* Register sysfs hooks */
+-      for (i = 0; i < sysfs_attr_i; i++)
+-              if (device_create_file(&pdev->dev,
+-                              &data->sysfs_attr[i].dev_attr))
++      for (i = 0; i < sysfs_attr_i; i++) {
++              res = device_create_file(&pdev->dev,
++                                       &data->sysfs_attr[i].dev_attr);
++              if (res)
+                       goto abituguru_probe_error;
+-      for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++)
+-              if (device_create_file(&pdev->dev,
+-                              &abituguru_sysfs_attr[i].dev_attr))
++      }
++      for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++) {
++              res = device_create_file(&pdev->dev,
++                                       &abituguru_sysfs_attr[i].dev_attr);
++              if (res)
+                       goto abituguru_probe_error;
++      }
+       data->hwmon_dev = hwmon_device_register(&pdev->dev);
+       if (!IS_ERR(data->hwmon_dev))
diff --git a/queue-3.0/media-mantis-fix-silly-crash-case.patch b/queue-3.0/media-mantis-fix-silly-crash-case.patch
new file mode 100644 (file)
index 0000000..38c154e
--- /dev/null
@@ -0,0 +1,38 @@
+From e1d45ae10aea8e8a403e5d96bf5902ee670007ff Mon Sep 17 00:00:00 2001
+From: Alan Cox <alan@linux.intel.com>
+Date: Thu, 9 Aug 2012 12:33:52 -0300
+Subject: media: mantis: fix silly crash case
+
+From: Alan Cox <alan@linux.intel.com>
+
+commit e1d45ae10aea8e8a403e5d96bf5902ee670007ff upstream.
+
+If we set mantis->fe to NULL on an error its not a good idea to then try
+passing NULL to the unregister paths and oopsing really.
+
+Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=16473
+
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Cc: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/dvb/mantis/mantis_dvb.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/dvb/mantis/mantis_dvb.c
++++ b/drivers/media/dvb/mantis/mantis_dvb.c
+@@ -248,8 +248,10 @@ int __devinit mantis_dvb_init(struct man
+ err5:
+       tasklet_kill(&mantis->tasklet);
+       dvb_net_release(&mantis->dvbnet);
+-      dvb_unregister_frontend(mantis->fe);
+-      dvb_frontend_detach(mantis->fe);
++      if (mantis->fe) {
++              dvb_unregister_frontend(mantis->fe);
++              dvb_frontend_detach(mantis->fe);
++      }
+ err4:
+       mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem);
index 8dcb997cd7fd55be86e2535d28041b546bd5e519..87f0ed7a23032762c89a5b28ce7cacb6a234613c 100644 (file)
@@ -1 +1,3 @@
 btrfs-don-t-stop-searching-after-encountering-the-wrong-item.patch
+hwmon-fix-error-return-code-in-abituguru_probe.patch
+media-mantis-fix-silly-crash-case.patch