qcacld-3.0: Link_vdev used but uninitialized
Link_vdev might be used uninitialized when goto end before mlo_get_vdev_by_link_id(). Change-Id: I56ff8620ead97f9f2992e9af52f4130f4194ae4d CRs-Fixed: 3698100
This commit is contained in:

committed by
Ravindra Konda

parent
5fbee0b879
commit
c41cfc10d9
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -12672,7 +12672,8 @@ static int hdd_get_mlo_max_band_info(struct wlan_hdd_link_info *link_info,
|
|||||||
struct nlattr *mlo_bd_info = NULL;
|
struct nlattr *mlo_bd_info = NULL;
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
uint32_t link_id = 0;
|
uint32_t link_id = 0;
|
||||||
struct wlan_objmgr_vdev *vdev, *link_vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
|
struct wlan_objmgr_vdev *link_vdev = NULL;
|
||||||
struct wlan_channel *bss_chan;
|
struct wlan_channel *bss_chan;
|
||||||
struct wlan_hdd_link_info *link_info_t;
|
struct wlan_hdd_link_info *link_info_t;
|
||||||
struct hdd_station_ctx *sta_ctx;
|
struct hdd_station_ctx *sta_ctx;
|
||||||
@@ -12746,13 +12747,14 @@ static int hdd_get_mlo_max_band_info(struct wlan_hdd_link_info *link_info,
|
|||||||
nla_nest_end(skb, mlo_bd);
|
nla_nest_end(skb, mlo_bd);
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
hdd_objmgr_put_vdev_by_user(link_vdev, WLAN_OSIF_ID);
|
if (link_vdev)
|
||||||
|
hdd_objmgr_put_vdev_by_user(link_vdev, WLAN_OSIF_ID);
|
||||||
}
|
}
|
||||||
nla_nest_end(skb, mlo_bd_info);
|
nla_nest_end(skb, mlo_bd_info);
|
||||||
end:
|
end:
|
||||||
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
|
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
|
||||||
|
|
||||||
if (ret)
|
if (link_vdev)
|
||||||
hdd_objmgr_put_vdev_by_user(link_vdev, WLAN_OSIF_ID);
|
hdd_objmgr_put_vdev_by_user(link_vdev, WLAN_OSIF_ID);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user