Skip to contentSkip to conversation

rtcan_flexcan: fix devtype_data initialization

PATCH Applied Alexandre Coffignal 2 participants 2 messages Nov 28, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtcan_flexcan: fix devtype_data initialization

fix devtype_data initialization when using CONFIG_OF and dtb file

---
 ksrc/drivers/can/rtcan_flexcan.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
ksrc/drivers/can/rtcan_flexcan.c +4 -2
index e97cd92..8f0e8d1 100644
@@ -1055,8 +1055,10 @@ static int flexcan_probe(struct platform_device *pdev)
 		devtype_data = (struct flexcan_devtype_data *)
 			pdev->id_entry->driver_data;
 	} else {
-		err = -ENODEV;
-		goto out_error;
+		if (!devtype_data){
+			err = -ENODEV;
+			goto out_error;
+		}
 	}
 
 	if (!clock_freq) {
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 1 line · Alexandre Coffignal

fix devtype_data initialization when using CONFIG_OF and dtb file

Merged, thanks.

Signature · 1 line
                                                                Gilles.