aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <[email protected]>2018-05-02 12:11:56 +0300
committerSean Paul <[email protected]>2018-05-07 10:19:11 -0400
commit4d6cb5e2fee52af17001e92950f0894304706ee4 (patch)
tree68c4247634406d79bcfc71ea944bc87034743be6
parent6a0f0c55619f0b82a677cab72e77c3444a5eee58 (diff)
drm/omap: check return value from soc_device_match
soc_device_match() can return NULL, so add a check and fail if soc_device_match() fails. Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Benoit Parrot <[email protected]> Reviewed-by: Peter Ujfalusi <[email protected]> Signed-off-by: Sean Paul <[email protected]>
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi4_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
index 35ed2add6189..813ba42f2753 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
@@ -922,8 +922,13 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
{
const struct hdmi4_features *features;
struct resource *res;
+ const struct soc_device_attribute *soc;
- features = soc_device_match(hdmi4_soc_devices)->data;
+ soc = soc_device_match(hdmi4_soc_devices);
+ if (!soc)
+ return -ENODEV;
+
+ features = soc->data;
core->cts_swmode = features->cts_swmode;
core->audio_use_mclk = features->audio_use_mclk;