Commit 8654cda0 authored by Sachin Kamat's avatar Sachin Kamat Committed by Greg Kroah-Hartman

staging: cxt1e1: hwprobe.c: Return negative error codes

Return negative error codes as is followed in the rest of the
kernel.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b6689c22
...@@ -309,7 +309,7 @@ c4hw_attach_all (void) ...@@ -309,7 +309,7 @@ c4hw_attach_all (void)
if (!found) if (!found)
{ {
pr_warning("No boards found\n"); pr_warning("No boards found\n");
return ENODEV; return -ENODEV;
} }
/* sanity check for consistent hardware found */ /* sanity check for consistent hardware found */
for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
...@@ -318,7 +318,7 @@ c4hw_attach_all (void) ...@@ -318,7 +318,7 @@ c4hw_attach_all (void)
{ {
pr_warning("%s: something very wrong with pci_get_device\n", pr_warning("%s: something very wrong with pci_get_device\n",
hi->devname); hi->devname);
return EIO; return -EIO;
} }
} }
/* bring board's memory regions on/line */ /* bring board's memory regions on/line */
...@@ -333,7 +333,7 @@ c4hw_attach_all (void) ...@@ -333,7 +333,7 @@ c4hw_attach_all (void)
pr_warning("%s: memory in use, addr=0x%lx, len=0x%lx ?\n", pr_warning("%s: memory in use, addr=0x%lx, len=0x%lx ?\n",
hi->devname, hi->addr[j], hi->len[j]); hi->devname, hi->addr[j], hi->len[j]);
cleanup_ioremap (); cleanup_ioremap ();
return ENOMEM; return -ENOMEM;
} }
hi->addr_mapped[j] = (unsigned long) ioremap (hi->addr[j], hi->len[j]); hi->addr_mapped[j] = (unsigned long) ioremap (hi->addr[j], hi->len[j]);
if (!hi->addr_mapped[j]) if (!hi->addr_mapped[j])
...@@ -341,7 +341,7 @@ c4hw_attach_all (void) ...@@ -341,7 +341,7 @@ c4hw_attach_all (void)
pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n", pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n",
hi->devname, hi->addr[j], hi->len[j]); hi->devname, hi->addr[j], hi->len[j]);
cleanup_ioremap (); cleanup_ioremap ();
return ENOMEM; return -ENOMEM;
} }
#ifdef SBE_MAP_DEBUG #ifdef SBE_MAP_DEBUG
pr_warning("%s: io remapped from phys %x to virt %x\n", pr_warning("%s: io remapped from phys %x to virt %x\n",
...@@ -365,7 +365,7 @@ c4hw_attach_all (void) ...@@ -365,7 +365,7 @@ c4hw_attach_all (void)
hi->devname, i, hi->pci_slot); hi->devname, i, hi->pci_slot);
cleanup_devs (); cleanup_devs ();
cleanup_ioremap (); cleanup_ioremap ();
return EIO; return -EIO;
} }
pci_set_master (hi->pdev[0]); pci_set_master (hi->pdev[0]);
pci_set_master (hi->pdev[1]); pci_set_master (hi->pdev[1]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment