提交 4d6cb5e2 编写于 作者: T Tomi Valkeinen 提交者: Sean Paul

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: NTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-2-tomi.valkeinen@ti.comReviewed-by: NBenoit Parrot <bparrot@ti.com>
Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NSean Paul <seanpaul@chromium.org>
上级 6a0f0c55
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册