summaryrefslogtreecommitdiffstats
path: root/net/can
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:19 +0200
commit8325ce9bca5522852e6fe9e9bee7ea8a9c30caac (patch)
tree22294e81bc3fd77bcfac1866dcbda9ba13d89897 /net/can
parentcan: af_can: convert block comments to network style comments (diff)
downloadlinux-8325ce9bca5522852e6fe9e9bee7ea8a9c30caac.tar.xz
linux-8325ce9bca5522852e6fe9e9bee7ea8a9c30caac.zip
can: af_can: 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')
-rw-r--r--net/can/af_can.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index dc8f9720d5cd..e3b37676cf53 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -209,8 +209,9 @@ int can_send(struct sk_buff *skb, int loop)
skb->protocol = htons(ETH_P_CANFD);
if (unlikely(cfd->len > CANFD_MAX_DLEN))
goto inval_skb;
- } else
+ } else {
goto inval_skb;
+ }
/* Make sure the CAN frame can pass the selected CAN netdevice.
* As structs can_frame and canfd_frame are similar, we can provide
@@ -753,8 +754,9 @@ int can_proto_register(const struct can_proto *cp)
if (rcu_access_pointer(proto_tab[proto])) {
pr_err("can: protocol %d already registered\n", proto);
err = -EBUSY;
- } else
+ } else {
RCU_INIT_POINTER(proto_tab[proto], cp);
+ }
mutex_unlock(&proto_tab_lock);
@@ -812,15 +814,16 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
d = dev->ml_priv;
if (d) {
- if (d->entries)
+ if (d->entries) {
d->remove_on_zero_entries = 1;
- else {
+ } else {
kfree(d);
dev->ml_priv = NULL;
}
- } else
+ } else {
pr_err("can: notifier: receive list not found for dev "
"%s\n", dev->name);
+ }
spin_unlock(&dev_net(dev)->can.can_rcvlists_lock);