All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Smolorz <smolorz@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] Correct error handling in rtcan_ixxat_pci.c if card has wrong sub_sys_id
Date: Tue, 10 Mar 2009 14:34:00 +0100	[thread overview]
Message-ID: <49B66C48.7070208@domain.hid> (raw)

[-- Attachment #1: Type: text/plain, Size: 79 bytes --]

Hi,

the subject says it all. The patch is only compile-tested.

-- 
Sebastian

[-- Attachment #2: rtcan_ixxat_pci.patch --]
[-- Type: text/plain, Size: 695 bytes --]

Index: ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c
===================================================================
--- ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c	(Revision 4679)
+++ ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c	(Arbeitskopie)
@@ -223,8 +223,10 @@ static int __devinit ixxat_pci_init_one 
     RTCAN_DBG("%s: Initializing device %04x:%04x:%04x\n",
 	      RTCAN_DRV_NAME, pdev->vendor, pdev->device, sub_sys_id);
 
-    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
-	    return -ENODEV;
+    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID) {
+	ret = -ENODEV;
+	goto failure_release_pci;
+    }
 
     /* Enable memory and I/O space */
     if ((ret = pci_write_config_word(pdev, 0x04, 0x3)))

                 reply	other threads:[~2009-03-10 13:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=49B66C48.7070208@domain.hid \
    --to=smolorz@domain.hid \
    --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.