Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06176b87 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman
Browse files

staging: ks7010: assign dev_alloc_name() result to variable before check it



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: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a7360b18
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1021,7 +1021,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;
	}