From 5c8251315bbca6e44f24d65093fb882ec835cb35 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Sat, 17 Dec 2016 21:46:44 +0100 Subject: ata/ahci: simplify ahci_read_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Sascha Hauer --- drivers/ata/ahci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/ata') 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, -- cgit v1.2.3