[PATCH] staging: fieldbus: anybuss: Remove variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Variable client, assigned to priv->client, is used only once in a
function argument; hence, it can be removed and the function argument
replaced with priv->client directly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@xxxxxxxxx>
---
 drivers/staging/fieldbus/anybuss/hms-profinet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/fieldbus/anybuss/hms-profinet.c b/drivers/staging/fieldbus/anybuss/hms-profinet.c
index 5446843e35f4..a7f85912fa92 100644
--- a/drivers/staging/fieldbus/anybuss/hms-profinet.c
+++ b/drivers/staging/fieldbus/anybuss/hms-profinet.c
@@ -124,9 +124,7 @@ static int __profi_enable(struct profi_priv *priv)
 
 static int __profi_disable(struct profi_priv *priv)
 {
-	struct anybuss_client *client = priv->client;
-
-	anybuss_set_power(client, false);
+	anybuss_set_power(priv->client, false);
 	priv->power_on = false;
 	return 0;
 }
-- 
2.19.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux