summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsayli karnik <karniksayli1995@gmail.com>2016-09-19 17:32:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-20 14:46:32 +0300
commitcd9ae9e4db8a62cfbdaec2d73f8c34eea66c48d5 (patch)
tree13364e19c71319b9547913e0fc0a975b4582f890
parent1e5a82e0ddfa6c9a2cf42ea87db3e079a4a483e6 (diff)
downloadlinux-cd9ae9e4db8a62cfbdaec2d73f8c34eea66c48d5.tar.xz
staging: i4l: act2000: Move assignment out of if statement
This patch places assignments which are inside the if condition, above it. Done using coccinelle: @@ statement s; expression e; identifier id; @@ - if ((id = e)) + id = e; + if (id) s Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/i4l/act2000/module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/i4l/act2000/module.c b/drivers/staging/i4l/act2000/module.c
index 39a8940b6ae5..99c9c0a1c63e 100644
--- a/drivers/staging/i4l/act2000/module.c
+++ b/drivers/staging/i4l/act2000/module.c
@@ -289,7 +289,8 @@ act2000_command(act2000_card *card, isdn_ctrl *c)
if (copy_from_user(tmp, arg,
sizeof(tmp)))
return -EFAULT;
- if ((ret = act2000_set_msn(card, tmp)))
+ ret = act2000_set_msn(card, tmp);
+ if (ret)
return ret;
if (card->flags & ACT2000_FLAGS_RUNNING)
return (actcapi_manufacturer_req_msn(card));