From: Dan Carpenter <dan.carpenter@oracle.com>
To: garlic.tseng@mediatek.com
Cc: alsa-devel@alsa-project.org, linux-mediatek@lists.infradead.org
Subject: [bug report] ASoC: mediatek: implement mediatek common structure
Date: Fri, 27 Aug 2021 11:57:34 +0300 [thread overview]
Message-ID: <20210827085734.GB9183@kili> (raw)
Hello Garlic Tseng,
The patch 283b612429a2: "ASoC: mediatek: implement mediatek common
structure" from Jun 17, 2016, leads to the following
Smatch static checker warning:
sound/soc/mediatek/common/mtk-afe-fe-dai.c:364 mtk_afe_resume()
error: we previously assumed 'afe->reg_back_up' could be null (see line 359)
sound/soc/mediatek/common/mtk-afe-fe-dai.c
354 if (pm_runtime_status_suspended(dev) || !afe->suspended)
355 return 0;
356
357 afe->runtime_resume(dev);
358
359 if (!afe->reg_back_up)
360 dev_dbg(dev, "%s no reg_backup\n", __func__);
Should this return? Also when ->reg_back_up is allocated there is no
check for NULL so it seems like a very possible condition.
361
362 for (i = 0; i < afe->reg_back_up_list_num; i++)
363 mtk_regmap_write(regmap, afe->reg_back_up_list[i],
--> 364 afe->reg_back_up[i]);
365
366 afe->suspended = false;
367 return 0;
368 }
regards,
dan carpenter
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next reply other threads:[~2021-08-27 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 8:57 Dan Carpenter [this message]
2021-08-30 7:43 ` [bug report] ASoC: mediatek: implement mediatek common structure Trevor Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210827085734.GB9183@kili \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=garlic.tseng@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox