Skip to content

Commit d81c079

Browse files
committed
Merge tag 'batadv-next-pullrequest-20240201' of git://git.open-mesh.org/linux-merge
Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Improve error handling in DAT and uevent generator, by Markus Elfring (2 patches) - Drop usage of export.h, by Sven Eckelmann ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 20ea932 + db60ad8 commit d81c079

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

net/batman-adv/distributed-arp-table.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ static bool batadv_dat_forward_data(struct batadv_priv *bat_priv,
684684

685685
cand = batadv_dat_select_candidates(bat_priv, ip, vid);
686686
if (!cand)
687-
goto out;
687+
return ret;
688688

689689
batadv_dbg(BATADV_DBG_DAT, bat_priv, "DHT_SEND for %pI4\n", &ip);
690690

@@ -728,7 +728,6 @@ static bool batadv_dat_forward_data(struct batadv_priv *bat_priv,
728728
batadv_orig_node_put(cand[i].orig_node);
729729
}
730730

731-
out:
732731
kfree(cand);
733732
return ret;
734733
}

net/batman-adv/main.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -691,29 +691,31 @@ int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type,
691691
"%s%s", BATADV_UEV_TYPE_VAR,
692692
batadv_uev_type_str[type]);
693693
if (!uevent_env[0])
694-
goto out;
694+
goto report_error;
695695

696696
uevent_env[1] = kasprintf(GFP_ATOMIC,
697697
"%s%s", BATADV_UEV_ACTION_VAR,
698698
batadv_uev_action_str[action]);
699699
if (!uevent_env[1])
700-
goto out;
700+
goto free_first_env;
701701

702702
/* If the event is DEL, ignore the data field */
703703
if (action != BATADV_UEV_DEL) {
704704
uevent_env[2] = kasprintf(GFP_ATOMIC,
705705
"%s%s", BATADV_UEV_DATA_VAR, data);
706706
if (!uevent_env[2])
707-
goto out;
707+
goto free_second_env;
708708
}
709709

710710
ret = kobject_uevent_env(bat_kobj, KOBJ_CHANGE, uevent_env);
711-
out:
712-
kfree(uevent_env[0]);
713-
kfree(uevent_env[1]);
714711
kfree(uevent_env[2]);
712+
free_second_env:
713+
kfree(uevent_env[1]);
714+
free_first_env:
715+
kfree(uevent_env[0]);
715716

716717
if (ret)
718+
report_error:
717719
batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
718720
"Impossible to send uevent for (%s,%s,%s) event (err: %d)\n",
719721
batadv_uev_type_str[type],

net/batman-adv/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define BATADV_DRIVER_DEVICE "batman-adv"
1414

1515
#ifndef BATADV_SOURCE_VERSION
16-
#define BATADV_SOURCE_VERSION "2024.0"
16+
#define BATADV_SOURCE_VERSION "2024.1"
1717
#endif
1818

1919
/* B.A.T.M.A.N. parameters */

net/batman-adv/netlink.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/cache.h>
1616
#include <linux/err.h>
1717
#include <linux/errno.h>
18-
#include <linux/export.h>
1918
#include <linux/genetlink.h>
2019
#include <linux/gfp.h>
2120
#include <linux/if_ether.h>

0 commit comments

Comments
 (0)