Changeset 36269


Ignore:
Timestamp:
2013-04-08T10:24:50+02:00 (5 years ago)
Author:
juhosg
Message:

ramips: avoid invalid pointer dereference in pinmux code

Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch

    r36247 r36269  
    2020  
    2121        np = of_find_compatible_node(NULL, NULL, "ralink,rt3050-sysc"); 
    22 @@ -76,5 +76,17 @@ void ralink_pinmux(void) 
     22@@ -76,5 +76,20 @@ void ralink_pinmux(void) 
    2323        if (wdt && *wdt && rt_pinmux.wdt_reset) 
    2424                rt_pinmux.wdt_reset(); 
    2525  
    26 +       of_property_read_string(np, "ralink,pcimux", &pci); 
     26+       pci = NULL; 
     27+       if (rt_pinmux.pci) 
     28+               of_property_read_string(np, "ralink,pcimux", &pci); 
     29+ 
    2730+       if (pci) { 
    2831+               int m = ralink_mux_mask(pci, rt_pinmux.pci); 
Note: See TracChangeset for help on using the changeset viewer.