summaryrefslogtreecommitdiffstats
path: root/net/can/raw.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2019-07-24 14:28:21 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-08-13 17:32:20 +0200
commitd5e4ecac87fc620b642c331d374a5fc4569493ed (patch)
tree59a84ac3ae8088b9f8ba813411fcaec962b13752 /net/can/raw.c
parentd6ada83bba9905c436b1ffcbd5fd995f5e38f291 (diff)
downloadlinux-d5e4ecac87fc620b642c331d374a5fc4569493ed.tar.bz2
can: raw: remove unnecessary blank lines, add suggested blank lines
This patch removes unnecessary blank lines, and adds suggested ones, 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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/can/raw.c b/net/can/raw.c
index cb68e155075c..96fe0b5e3e1e 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -280,7 +280,6 @@ static int raw_notifier(struct notifier_block *nb,
return NOTIFY_DONE;
switch (msg) {
-
case NETDEV_UNREGISTER:
lock_sock(sk);
/* remove current filters & unregister */
@@ -499,7 +498,6 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
return -EINVAL;
switch (optname) {
-
case CAN_RAW_FILTER:
if (optlen % sizeof(struct can_filter) != 0)
return -EINVAL;
@@ -662,11 +660,11 @@ static int raw_getsockopt(struct socket *sock, int level, int optname,
return -EINVAL;
switch (optname) {
-
case CAN_RAW_FILTER:
lock_sock(sk);
if (ro->count > 0) {
int fsize = ro->count * sizeof(struct can_filter);
+
if (len > fsize)
len = fsize;
if (copy_to_user(optval, ro->filter, len))