aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-04-08 08:24:50 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-04-08 08:24:50 +0000
commitcd7ce5226da31972687f9bd773afaadffd250013 (patch)
tree9692a3ea734dcc6852f3a58fee7275eeec8998e7 /target/linux
parent4c85227cf4a88f6f581e9597170354461f91351c (diff)
downloadupstream-cd7ce5226da31972687f9bd773afaadffd250013.tar.gz
upstream-cd7ce5226da31972687f9bd773afaadffd250013.tar.bz2
upstream-cd7ce5226da31972687f9bd773afaadffd250013.zip
ramips: avoid invalid pointer dereference in pinmux code
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36269
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch7
1 files changed, 5 insertions, 2 deletions
diff --git a/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch b/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
index 08cd2428f7..d5c037e2e3 100644
--- a/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
+++ b/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
@@ -19,11 +19,14 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
u32 mode = 0;
np = of_find_compatible_node(NULL, NULL, "ralink,rt3050-sysc");
-@@ -76,5 +76,17 @@ void ralink_pinmux(void)
+@@ -76,5 +76,20 @@ void ralink_pinmux(void)
if (wdt && *wdt && rt_pinmux.wdt_reset)
rt_pinmux.wdt_reset();
-+ of_property_read_string(np, "ralink,pcimux", &pci);
++ pci = NULL;
++ if (rt_pinmux.pci)
++ of_property_read_string(np, "ralink,pcimux", &pci);
++
+ if (pci) {
+ int m = ralink_mux_mask(pci, rt_pinmux.pci);
+ mode &= ~(rt_pinmux.pci_mask << rt_pinmux.pci_shift);