All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre COFFIGNAL <acoffignal@geral.com>
To: xenomai@xenomai.org
Subject: [Xenomai] [PATCH] rtcan_flexcan: fix devtype_data initialization
Date: Thu, 28 Nov 2013 09:41:10 +0100	[thread overview]
Message-ID: <529701A6.5010100@geral.com> (raw)

|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



             reply	other threads:[~2013-11-28  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28  8:41 Alexandre COFFIGNAL [this message]
2013-11-28 12:51 ` [Xenomai] [PATCH] rtcan_flexcan: fix devtype_data initialization 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=529701A6.5010100@geral.com \
    --to=acoffignal@geral.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.