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

Commit 1cbe7adb authored by Mihaela Muraru's avatar Mihaela Muraru Committed by Greg Kroah-Hartman
Browse files

Staging: netlogic: Compress return logic into one line



Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
        e;
-return ret;

Signed-off-by: default avatarMihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 42178baf
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1007,10 +1007,8 @@ static int xlr_net_probe(struct platform_device *pdev)
	 */
	adapter = (struct xlr_adapter *)
		devm_kzalloc(&pdev->dev, sizeof(*adapter), GFP_KERNEL);
	if (!adapter) {
		err = -ENOMEM;
		return err;
	}
	if (!adapter)
		return -ENOMEM;

	/*
	 * XLR and XLS have 1 and 2 NAE controller respectively