Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4febfb91 authored by Rongjing Liao's avatar Rongjing Liao Committed by snandini
Browse files

qcacmn: fix null pointer 'err' reference issue

When 'err' is null pointer, QDF_ASSERT(0) will not return
directly, then null pointer reference will occur. To fix this
issue, return failure when 'err' is null pointer.

Change-Id: I5912571795ae55c6729ae06d5e06496598c21fbb
CRs-Fixed: 2642581
parent de629cae
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2778,6 +2778,7 @@ _target_if_set_spectral_config(struct target_if_spectral *spectral,
	if (!err) {
		spectral_err("Error code argument is null");
		QDF_ASSERT(0);
		return QDF_STATUS_E_FAILURE;
	}
	*err = SPECTRAL_SCAN_ERR_INVALID;

@@ -2944,6 +2945,7 @@ target_if_set_spectral_config(struct wlan_objmgr_pdev *pdev,
	if (!err) {
		spectral_err("Error code argument is null");
		QDF_ASSERT(0);
		return QDF_STATUS_E_FAILURE;
	}
	*err = SPECTRAL_SCAN_ERR_INVALID;

@@ -3677,6 +3679,7 @@ target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev,
	if (!err) {
		spectral_err("Error code argument is null");
		QDF_ASSERT(0);
		return QDF_STATUS_E_FAILURE;
	}
	*err = SPECTRAL_SCAN_ERR_INVALID;

@@ -3851,6 +3854,7 @@ target_if_stop_spectral_scan(struct wlan_objmgr_pdev *pdev,
	if (!err) {
		spectral_err("Error code argument is null");
		QDF_ASSERT(0);
		return QDF_STATUS_E_FAILURE;
	}
	*err = SPECTRAL_SCAN_ERR_INVALID;