summaryrefslogtreecommitdiff
path: root/net/can/raw.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2019-08-13 09:03:55 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-08-13 17:32:20 +0200
commitbff10040672d41bd027c267d78e967c374d4e04b (patch)
treecdc1c543115b78dd75c5c22d8bf2b7da42269c3c /net/can/raw.c
parentd5e4ecac87fc620b642c331d374a5fc4569493ed (diff)
can: raw: balance braces around else statements
This patch balances the braces around else statements, so that checkpatch doesn't complain anymore. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can/raw.c')
-rw-r--r--net/can/raw.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/can/raw.c b/net/can/raw.c
index 96fe0b5e3e1e..54517f9b1662 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -365,8 +365,9 @@ static int raw_release(struct socket *sock)
raw_disable_allfilters(dev_net(dev), dev, sk);
dev_put(dev);
}
- } else
+ } else {
raw_disable_allfilters(sock_net(sk), NULL, sk);
+ }
}
if (ro->count > 1)
@@ -446,8 +447,9 @@ static int raw_bind(struct socket *sock, struct sockaddr *uaddr, int len)
dev, sk);
dev_put(dev);
}
- } else
+ } else {
raw_disable_allfilters(sock_net(sk), NULL, sk);
+ }
}
ro->ifindex = ifindex;
ro->bound = 1;
@@ -669,8 +671,9 @@ static int raw_getsockopt(struct socket *sock, int level, int optname,
len = fsize;
if (copy_to_user(optval, ro->filter, len))
err = -EFAULT;
- } else
+ } else {
len = 0;
+ }
release_sock(sk);
if (!err)
@@ -737,8 +740,9 @@ static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
return -EINVAL;
ifindex = addr->can_ifindex;
- } else
+ } else {
ifindex = ro->ifindex;
+ }
dev = dev_get_by_index(sock_net(sk), ifindex);
if (!dev)