diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2016-12-17 21:46:44 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-01-10 08:27:33 +0100 |
commit | 5c8251315bbca6e44f24d65093fb882ec835cb35 (patch) | |
tree | c5ab40fb1a926c9802f1e08dcefd0cd89a16ba91 /drivers/ata | |
parent | fb28915aacfe5ae133e6b20b43ffb0708de382f1 (diff) | |
download | barebox-5c8251315bbca6e44f24d65093fb882ec835cb35.tar.gz barebox-5c8251315bbca6e44f24d65093fb882ec835cb35.tar.xz |
ata/ahci: simplify ahci_read_id
This is a dummy commit log body because I consider the change to trivial
to write something sensible.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index c31b337ba2..b416105970 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -207,7 +207,6 @@ static int ahci_read_id(struct ata_port *ata, void *buf) { struct ahci_port *ahci = container_of(ata, struct ahci_port, ata); u8 fis[20]; - int ret; memset(fis, 0, sizeof(fis)); @@ -216,11 +215,7 @@ static int ahci_read_id(struct ata_port *ata, void *buf) fis[1] = 1 << 7; /* Command FIS. */ fis[2] = ATA_CMD_ID_ATA; /* Command byte. */ - ret = ahci_io(ahci, fis, sizeof(fis), buf, NULL, SECTOR_SIZE); - if (ret) - return ret; - - return ret; + return ahci_io(ahci, fis, sizeof(fis), buf, NULL, SECTOR_SIZE); } static int ahci_rw(struct ata_port *ata, void *rbuf, const void *wbuf, |