firewire: ohci: propagate return code from soft_reset to probe and resume
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 1 Nov 2015 14:52:13 +0000 (15:52 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 5 Nov 2015 13:25:31 +0000 (14:25 +0100)
software_reset() may fail
  - due to unresponsive chip with -EBUSY (-16), or
  - due to ejected or unseated card with -ENODEV (-19).
Let the PCI probe and resume routines log the actual error code instead
of hardwired -EBUSY.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c

index c2f5117fd8cb00c48f42784dcef9c97ebaa92080..8bf89267dc252f260a3fc6e640c0c1809f04ef2d 100644 (file)
@@ -2278,9 +2278,10 @@ static int ohci_enable(struct fw_card *card,
        u32 lps, version, irqs;
        int i, ret;
 
-       if (software_reset(ohci)) {
+       ret = software_reset(ohci);
+       if (ret < 0) {
                ohci_err(ohci, "failed to reset ohci card\n");
-               return -EBUSY;
+               return ret;
        }
 
        /*