Skip to contentSkip to conversation

rtcan_flexcan: fix devtype_data initialization

PATCH In review Alexandre COFFIGNAL 2 participants 3 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 3 lines · Alexandre COFFIGNAL

|fix devtype_data initialization when using CONFIG_OF and dtb file

Patch does not apply.

ksrc/drivers/can/rtcan_flexcan.c static int flexcan_probe(struct platform_device *pdev) · line 1056

Quoted 12 lines

|---

   ksrc/drivers/can/rtcan_flexcan.c |    6 ++++--
   1 file changed, 4 insertions(+), 2 deletions(-)
ksrc/drivers/can/rtcan_flexcan.c +0 -0
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;

I guess due to the carriage return introduced by your MUA here ^. The simplest solution to send correctly formatted mails is to use git format-patch and git send-email.

Signature · 1 line
					    Gilles.
#2 lore raw
Quoted 12 lines · Gilles Chanteperdrix
Quoted 3 lines · Alexandre COFFIGNAL

|fix devtype_data initialization when using CONFIG_OF and dtb file

Patch does not apply.

Quoted 5 lines

|---

    ksrc/drivers/can/rtcan_flexcan.c |    6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 12 lines

ksrc/drivers/can/rtcan_flexcan.c static int flexcan_probe(struct platform_device *pdev) · line 1056

Quoted 7 lines
ksrc/drivers/can/rtcan_flexcan.c +0 -0
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;

I guess due to the carriage return introduced by your MUA here ^. The simplest solution to send correctly formatted mails is to use git format-patch and git send-email.

No, the carriage return is here in the original sources. So, I do not know why your patch does not apply, but still, if you use git to generate and send the patch, it should work.

Signature · 1 line
					    Gilles.