diff options
author | Mihaela Muraru <mihaela.muraru21@gmail.com> | 2016-10-13 19:45:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-16 10:27:33 +0200 |
commit | 1cbe7adb9c6d10830494e81f2867858da2fd4c53 (patch) | |
tree | a480d8f232d70695791ffb19d97fd53007fe7261 /drivers | |
parent | 42178baf4af085be43aea426ff926914fc202d5b (diff) | |
download | linux-1cbe7adb9c6d10830494e81f2867858da2fd4c53.tar.bz2 |
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: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/netlogic/xlr_net.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index cdf01b931296..fb0928a4fb97 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -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 |