* [B.A.T.M.A.N.] [PATCH] batman-adv: fix returned error in batadv_netlink_tp_meter_cancel
@ 2016-05-20 18:49 Sven Eckelmann
2016-06-06 16:07 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2016-05-20 18:49 UTC (permalink / raw)
To: b.a.t.m.a.n
From: Simon Wunderlich <sw@simonwunderlich.de>
The BATADV_CMD_TP_METER_CANCEL netlink cmd can for example fail when no
valid soft_iface can be found. This error should not only detected but
also be reported back to the caller.
Fixes: 98d7a766b645 ("batman-adv: throughput meter implementation")
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
net/batman-adv/netlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
index 56e63ce..c25bbb8 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -350,7 +350,7 @@ batadv_netlink_tp_meter_cancel(struct sk_buff *skb, struct genl_info *info)
struct batadv_priv *bat_priv;
int ifindex;
u8 *dst;
- int ret;
+ int ret = 0;
if (!info->attrs[BATADV_ATTR_MESH_IFINDEX])
return -EINVAL;
@@ -377,7 +377,7 @@ out:
if (soft_iface)
dev_put(soft_iface);
- return 0;
+ return ret;
}
static struct genl_ops batadv_netlink_ops[] = {
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix returned error in batadv_netlink_tp_meter_cancel
2016-05-20 18:49 [B.A.T.M.A.N.] [PATCH] batman-adv: fix returned error in batadv_netlink_tp_meter_cancel Sven Eckelmann
@ 2016-06-06 16:07 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2016-06-06 16:07 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
On Friday, May 20, 2016 20:49:40 Sven Eckelmann wrote:
> From: Simon Wunderlich <sw@simonwunderlich.de>
>
> The BATADV_CMD_TP_METER_CANCEL netlink cmd can for example fail when no
> valid soft_iface can be found. This error should not only detected but
> also be reported back to the caller.
>
> Fixes: 98d7a766b645 ("batman-adv: throughput meter implementation")
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> net/batman-adv/netlink.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied in revision f0aae6b.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-06 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 18:49 [B.A.T.M.A.N.] [PATCH] batman-adv: fix returned error in batadv_netlink_tp_meter_cancel Sven Eckelmann
2016-06-06 16:07 ` Marek Lindner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.