asoc: lpass-cdc: add null pointer check in register_notifier func

Add null pointer check in register_notifier funcion.

Change-Id: Icba3776cbf33095dc8bdf32ed7b6c749e639a11b
This commit is contained in:
Yuhui Zhao
2023-03-29 17:43:48 +08:00
committed by Gerrit - the friendly Code Review server
parent 3038c0281b
commit 6b2a5ea4d9

View File

@@ -233,8 +233,8 @@ static int lpass_cdc_register_notifier(void *handle,
{
struct lpass_cdc_priv *priv = (struct lpass_cdc_priv *)handle;
if (!priv) {
pr_err_ratelimited("%s: lpass_cdc priv is null\n", __func__);
if (!priv || !nblock) {
pr_err_ratelimited("%s: lpass_cdc priv or nblock is null\n", __func__);
return -EINVAL;
}
if (enable)