[linux-next] LinuxNextTracking branch, master, updated. next-20150826

batman at open-mesh.org batman at open-mesh.org
Thu Aug 27 00:15:36 CEST 2015

The following commit has been merged in the master branch:
commit 77927b7d9dd6c9c5f59f0f49c76cda54b908090e
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sun Jun 21 14:42:49 2015 +0200

    batman-adv: Return EINVAL on invalid gw_bandwidth change
    Invalid speed settings by the user are currently acknowledged as correct
    but not stored. Instead the return of the store operation of the file
    "gw_bandwidth" should indicate that the given value is not acceptable.
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    Signed-off-by: Marek Lindner <mareklindner at neomailbox.ch>
    Signed-off-by: Antonio Quartulli <antonio at meshcoding.com>

diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index c50931c..6b930a6 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -19,6 +19,7 @@
 #include "main.h"
 #include <linux/atomic.h>
+#include <linux/errno.h>
 #include <linux/byteorder/generic.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
@@ -160,7 +161,7 @@ ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff,
 	ret = batadv_parse_gw_bandwidth(net_dev, buff, &down_new, &up_new);
 	if (!ret)
-		goto end;
+		return -EINVAL;
 	if (!down_new)
 		down_new = 1;
@@ -184,7 +185,6 @@ ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff,
 	atomic_set(&bat_priv->gw.bandwidth_up, up_new);
 	return count;


More information about the linux-merge mailing list