[bug report] ASoC: mediatek: mt8188: support etdm in platform driver
Dan Carpenter
error27 at gmail.com
Mon Jan 30 03:40:07 PST 2023
On Mon, Jan 30, 2023 at 09:25:52AM +0000, Trevor Wu (吳文良) wrote:
> Hi Dan,
>
> Thank you for catching that.
> I didn't notice that snprintf() never returns a negative value in
> kernel code.
> It is possible that I misunderstood the coverity error message, but I
> can't find the original coverity scan result.
>
> If I just remove the dead code, coverity will report some errors in the
> future.
> As a result, I prefer to keep the line and add another check "ret >=
> sizeof(prop)", so that we can avoid the problem reported by coverity
> and Smatch.
Generally, when static checkers print nonsense warnings you should just
ignore them instead of adding dead code so I would encourage to delete
the dead code even though Coverity complains. Fix what is broken
instead of just working around it.
regards,
dan carpenter
More information about the Linux-mediatek
mailing list