From 19667b7af867f3e1eaecd9225c2f19c643b343c1 Mon Sep 17 00:00:00 2001 From: juhosg Date: Mon, 8 Apr 2013 08:24:50 +0000 Subject: ramips: avoid invalid pointer dereference in pinmux code Signed-off-by: Gabor Juhos git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36269 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'target/linux') 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 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); -- cgit v1.2.3