Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 771f573c authored by Tomi Valkeinen's avatar Tomi Valkeinen Committed by Greg Kroah-Hartman
Browse files

drm/omap: check return value from soc_device_match



[ Upstream commit 4d6cb5e2 ]

soc_device_match() can return NULL, so add a check and fail if
soc_device_match() fails.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-2-tomi.valkeinen@ti.com


Reviewed-by: default avatarBenoit Parrot <bparrot@ti.com>
Reviewed-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a490d057
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -926,8 +926,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;