[PATCH 13/14] staging: ks7010: assign dev_alloc_name() result to variable before check it

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

 



This commit assigns dev_alloc_name() call to 'ret' variable to
check it after instead of check directly the call in the if
condition. This improves a bit readability. It also add an empty
line before the new assignment to separate it from the previous
check statement block.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
---
 drivers/staging/ks7010/ks7010_sdio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 9fc9808..9c591e0 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -1015,7 +1015,9 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 		dev_err(&card->func->dev, "Unable to alloc new net device\n");
 		goto err_release_irq;
 	}
-	if (dev_alloc_name(netdev, "wlan%d") < 0) {
+
+	ret = dev_alloc_name(netdev, "wlan%d");
+	if (ret < 0) {
 		dev_err(&card->func->dev, "Couldn't get name!\n");
 		goto err_free_netdev;
 	}
-- 
2.7.4

_______________________________________________
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