Skip to content
Commit 311242c7 authored by Yang Yingliang's avatar Yang Yingliang Committed by Lee Jones
Browse files

mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe()



It will cause null-ptr-deref when using 'res', if platform_get_resource()
returns NULL, so move using 'res' after devm_ioremap_resource() that
will check it to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.

Fixes: b5e29aa8 ("mfd: davinci_voicecodec: Remove pointless #include")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220426030857.3539336-1-yangyingliang@huawei.com
parent eeb0a442
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment