Commit 96072e69 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

[PATCH] libata: make ata_bus_probe() return negative errno on failure

ata_bus_probe() uses unsigned int rc to receive negative errno and
returns the converted unsigned int value.  Convert temporary variables
to int and make ata_bus_probe() return negative errno on failure.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 5bbc53f4
......@@ -1349,13 +1349,13 @@ static int ata_dev_configure(struct ata_port *ap, struct ata_device *dev,
* PCI/etc. bus probe sem.
*
* RETURNS:
* Zero on success, non-zero on error.
* Zero on success, negative errno otherwise.
*/
static int ata_bus_probe(struct ata_port *ap)
{
unsigned int classes[ATA_MAX_DEVICES];
unsigned int i, rc, found = 0;
int i, rc, found = 0;
ata_port_probe(ap);
......@@ -1421,7 +1421,7 @@ static int ata_bus_probe(struct ata_port *ap)
err_out_disable:
ap->ops->port_disable(ap);
return -1;
return -ENODEV;
}
/**
......
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