ramips: avoid invalid pointer dereference in pinmux code
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36269
This commit is contained in:
parent
4c85227cf4
commit
cd7ce5226d
1 changed files with 5 additions and 2 deletions
|
@ -19,11 +19,14 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
u32 mode = 0;
|
u32 mode = 0;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "ralink,rt3050-sysc");
|
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)
|
if (wdt && *wdt && rt_pinmux.wdt_reset)
|
||||||
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) {
|
+ if (pci) {
|
||||||
+ int m = ralink_mux_mask(pci, rt_pinmux.pci);
|
+ int m = ralink_mux_mask(pci, rt_pinmux.pci);
|
||||||
+ mode &= ~(rt_pinmux.pci_mask << rt_pinmux.pci_shift);
|
+ mode &= ~(rt_pinmux.pci_mask << rt_pinmux.pci_shift);
|
||||||
|
|
Loading…
Reference in a new issue