[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180618080616.985131718@linuxfoundation.org>
Date: Mon, 18 Jun 2018 10:13:00 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Tomi Valkeinen <tomi.valkeinen@...com>,
Benoit Parrot <bparrot@...com>,
Peter Ujfalusi <peter.ujfalusi@...com>,
Sean Paul <seanpaul@...omium.org>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.16 195/279] drm/omap: check return value from soc_device_match
4.16-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomi Valkeinen <tomi.valkeinen@...com>
[ Upstream commit 4d6cb5e2fee52af17001e92950f0894304706ee4 ]
soc_device_match() can return NULL, so add a check and fail if
soc_device_match() fails.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-2-tomi.valkeinen@ti.com
Reviewed-by: Benoit Parrot <bparrot@...com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@...com>
Signed-off-by: Sean Paul <seanpaul@...omium.org>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- 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_devi
{
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;
Powered by blists - more mailing lists