linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata-scsi: Delete an unnecessary variable in ata_scsi_slave_config()
@ 2018-02-16 17:26 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-02-16 17:26 UTC (permalink / raw)
  To: linux-ide, Tejun Heo; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 16 Feb 2018 18:19:13 +0100

* Return a result code without storing it in an intermediate variable.

* Reduce the needed source code.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/ata/libata-scsi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 66be961c93a4..93456cff051b 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1345,14 +1345,9 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
 {
 	struct ata_port *ap = ata_shost_to_port(sdev->host);
 	struct ata_device *dev = __ata_scsi_find_dev(ap, sdev);
-	int rc = 0;
 
 	ata_scsi_sdev_config(sdev);
-
-	if (dev)
-		rc = ata_scsi_dev_config(sdev, dev);
-
-	return rc;
+	return dev ? ata_scsi_dev_config(sdev, dev) : 0;
 }
 
 /**
-- 
2.16.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-16 17:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-16 17:26 [PATCH] libata-scsi: Delete an unnecessary variable in ata_scsi_slave_config() SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).