aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-04-01 01:38:17 +0900
committerJeff Garzik <jeff@garzik.org>2006-04-01 12:33:45 -0500
commit96072e699be08af8e7c33c56759582ea89088a02 (patch)
tree121ba18baf51bd12a9066fcd8b7d530d15ee6017 /drivers
parent5bbc53f4cfd28bf1d0e476ed23bc3a094eff718a (diff)
downloadkernel_samsung_smdk4412-96072e699be08af8e7c33c56759582ea89088a02.tar.gz
kernel_samsung_smdk4412-96072e699be08af8e7c33c56759582ea89088a02.tar.bz2
kernel_samsung_smdk4412-96072e699be08af8e7c33c56759582ea89088a02.zip
[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: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 8def7a5e436..c7ba523fb1e 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1349,13 +1349,13 @@ err_out_nosup:
* 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;
}
/**