batman-adv: Check return value of try_module_get
New operations should not be started when they need an increased module reference counter and try_module_get failed. This patch addresses Coverity #712284: Unchecked return value Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
This commit is contained in:

committed by
Antonio Quartulli

parent
8e7c15d6b5
commit
bd5b80d51a
@@ -160,16 +160,6 @@ void batadv_mesh_free(struct net_device *soft_iface)
|
||||
atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE);
|
||||
}
|
||||
|
||||
void batadv_inc_module_count(void)
|
||||
{
|
||||
try_module_get(THIS_MODULE);
|
||||
}
|
||||
|
||||
void batadv_dec_module_count(void)
|
||||
{
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
int batadv_is_my_mac(const uint8_t *addr)
|
||||
{
|
||||
const struct batadv_hard_iface *hard_iface;
|
||||
|
Reference in New Issue
Block a user