linux_dsm_epyc7002/drivers/gpu/drm/meson
Wei Yongjun acaa3f13b8 drm/meson: Fix potential NULL dereference in meson_drv_bind_master()
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
2018-03-20 17:15:40 +01:00
..
Kconfig drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY 2017-04-04 17:49:31 +02:00
Makefile drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY 2017-04-04 17:49:31 +02:00
meson_canvas.c drm/meson: Convert existing documentation to actual kerneldoc 2017-04-04 17:49:31 +02:00
meson_canvas.h
meson_crtc.c drm: Convert atomic drivers from CRTC .disable() to .atomic_disable() 2017-06-30 14:53:15 +02:00
meson_crtc.h
meson_drv.c drm/meson: Fix potential NULL dereference in meson_drv_bind_master() 2018-03-20 17:15:40 +01:00
meson_drv.h drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY 2017-04-04 17:49:31 +02:00
meson_dw_hdmi.c drm/meson: Add support for DMT modes on HDMI 2018-03-13 11:50:23 +01:00
meson_dw_hdmi.h drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY 2017-04-04 17:49:31 +02:00
meson_plane.c drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
meson_plane.h
meson_registers.h drm/meson: Add missing VPU init 2017-12-08 10:43:46 +01:00
meson_vclk.c drm/meson: Add support for DMT modes on HDMI 2018-03-13 11:50:23 +01:00
meson_vclk.h drm/meson: add support for HDMI clock support 2017-04-04 17:49:31 +02:00
meson_venc_cvbs.c drm: Nuke drm_atomic_helper_connector_dpms 2017-08-08 14:48:48 +02:00
meson_venc_cvbs.h
meson_venc.c drm/meson: Add support for DMT modes on HDMI 2018-03-13 11:50:23 +01:00
meson_venc.h drm/meson: Add support for DMT modes on HDMI 2018-03-13 11:50:23 +01:00
meson_viu.c drm/meson: Convert existing documentation to actual kerneldoc 2017-04-04 17:49:31 +02:00
meson_viu.h
meson_vpp.c drm/meson: Convert existing documentation to actual kerneldoc 2017-04-04 17:49:31 +02:00
meson_vpp.h drm/meson: Add support for HDMI venc modes and settings 2017-04-04 17:49:31 +02:00