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:

committed by
Gerrit - the friendly Code Review server

parent
3038c0281b
commit
6b2a5ea4d9
@@ -233,8 +233,8 @@ static int lpass_cdc_register_notifier(void *handle,
|
|||||||
{
|
{
|
||||||
struct lpass_cdc_priv *priv = (struct lpass_cdc_priv *)handle;
|
struct lpass_cdc_priv *priv = (struct lpass_cdc_priv *)handle;
|
||||||
|
|
||||||
if (!priv) {
|
if (!priv || !nblock) {
|
||||||
pr_err_ratelimited("%s: lpass_cdc priv is null\n", __func__);
|
pr_err_ratelimited("%s: lpass_cdc priv or nblock is null\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (enable)
|
if (enable)
|
||||||
|
Reference in New Issue
Block a user