wil6210: fix chan check in wil_p2p_listen
In wil_p2p_listen chan is checked to protect against NULL pointer access only before setting channel = chan->hw_value. Add a global parameter check to cover all accesses to chan. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
deb85bb1da
commit
9c830abe91
|
@ -114,7 +114,9 @@ int wil_p2p_listen(struct wil6210_priv *wil, unsigned int duration,
|
|||
u8 channel = P2P_DMG_SOCIAL_CHANNEL;
|
||||
int rc;
|
||||
|
||||
if (chan)
|
||||
if (!chan)
|
||||
return -EINVAL;
|
||||
|
||||
channel = chan->hw_value;
|
||||
|
||||
wil_dbg_misc(wil, "%s: duration %d\n", __func__, duration);
|
||||
|
|
Loading…
Reference in New Issue