|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* 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
|
|
|
* 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;
|
|
|
uint32_t i = 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_hdd_link_info *link_info_t;
|
|
|
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);
|
|
|
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);
|
|
|
end:
|
|
|
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);
|
|
|
|
|
|
return ret;
|