mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 14:09:55 +07:00
acaa3f13b8
platform_get_resource_byname() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource_byname(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/1521555630-29284-1-git-send-email-weiyongjun1@huawei.com |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
meson_canvas.c | ||
meson_canvas.h | ||
meson_crtc.c | ||
meson_crtc.h | ||
meson_drv.c | ||
meson_drv.h | ||
meson_dw_hdmi.c | ||
meson_dw_hdmi.h | ||
meson_plane.c | ||
meson_plane.h | ||
meson_registers.h | ||
meson_vclk.c | ||
meson_vclk.h | ||
meson_venc_cvbs.c | ||
meson_venc_cvbs.h | ||
meson_venc.c | ||
meson_venc.h | ||
meson_viu.c | ||
meson_viu.h | ||
meson_vpp.c | ||
meson_vpp.h |