diff mbox series

[-next] ata: pata_samsung_cf: simplify the return expression of pata_s3c_wait_after_reset()

Message ID 20200915032621.1772254-1-liushixin2@huawei.com
State Not Applicable
Delegated to: David Miller
Headers show
Series [-next] ata: pata_samsung_cf: simplify the return expression of pata_s3c_wait_after_reset() | expand

Commit Message

Liu Shixin Sept. 15, 2020, 3:26 a.m. UTC
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/ata/pata_samsung_cf.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index 3da0e8e30286..5fd5c79e1543 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -340,19 +340,14 @@  static unsigned int pata_s3c_devchk(struct ata_port *ap,
 static int pata_s3c_wait_after_reset(struct ata_link *link,
 		unsigned long deadline)
 {
-	int rc;
-
 	ata_msleep(link->ap, ATA_WAIT_AFTER_RESET);
 
-	/* always check readiness of the master device */
-	rc = ata_sff_wait_ready(link, deadline);
-	/* -ENODEV means the odd clown forgot the D7 pulldown resistor
+	/*
+	 * always check readiness of the master device.
+	 * -ENODEV means the odd clown forgot the D7 pulldown resistor
 	 * and TF status is 0xff, bail out on it too.
 	 */
-	if (rc)
-		return rc;
-
-	return 0;
+	return ata_sff_wait_ready(link, deadline);
 }
 
 /*