Skip to content

Commit

Permalink
[PATCH] libata: make ata_bus_probe() return negative errno on failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 1, 2006
1 parent 5bbc53f commit 96072e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 96072e6

Please sign in to comment.