All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] rtcan_flexcan: fix devtype_data initialization
@ 2013-11-28  8:41 Alexandre COFFIGNAL
  2013-11-28 12:51 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre COFFIGNAL @ 2013-11-28  8:41 UTC (permalink / raw)
  To: xenomai

|fix devtype_data initialization when using CONFIG_OF and dtb file

Signed-off-by: Alexandre COFFIGNAL <acoffignal@geral.com>

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

diff --git a/ksrc/drivers/can/rtcan_flexcan.c b/ksrc/drivers/can/rtcan_flexcan.c
index e97cd92..8f0e8d1 100644
--- a/ksrc/drivers/can/rtcan_flexcan.c
+++ b/ksrc/drivers/can/rtcan_flexcan.c
@@ -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) {
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [Xenomai] [PATCH] rtcan_flexcan: fix devtype_data initialization
@ 2013-11-28 14:27 Alexandre Coffignal
  2013-11-28 19:52 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Coffignal @ 2013-11-28 14:27 UTC (permalink / raw)
  To: xenomai

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(-)

diff --git a/ksrc/drivers/can/rtcan_flexcan.c b/ksrc/drivers/can/rtcan_flexcan.c
index e97cd92..8f0e8d1 100644
--- a/ksrc/drivers/can/rtcan_flexcan.c
+++ b/ksrc/drivers/can/rtcan_flexcan.c
@@ -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) {
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-28 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28  8:41 [Xenomai] [PATCH] rtcan_flexcan: fix devtype_data initialization Alexandre COFFIGNAL
2013-11-28 12:51 ` Gilles Chanteperdrix
2013-11-28 12:55   ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2013-11-28 14:27 Alexandre Coffignal
2013-11-28 19:52 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.