From: Dan Carpenter <dan.carpenter@oracle.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: David Airlie <airlied@linux.ie>,
kernel-janitors@vger.kernel.org,
Liam Girdwood <lgirdwood@gmail.com>,
dri-devel@lists.freedesktop.org, Mark Brown <broonie@kernel.org>,
Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH] drm: panel-lvds: Potential Oops in probe error handling
Date: Wed, 04 Sep 2019 10:03:29 +0000 [thread overview]
Message-ID: <20190904100329.GE7007@mwanda> (raw)
The "lvds->backlight" pointer could be NULl if of_parse_phandle()
returns NULL.
Fixes: 7c9dff5bd643 ("drm: panels: Add LVDS panel driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/gpu/drm/panel/panel-lvds.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
index ad47cc95459e..3b4eb959e994 100644
--- a/drivers/gpu/drm/panel/panel-lvds.c
+++ b/drivers/gpu/drm/panel/panel-lvds.c
@@ -272,7 +272,8 @@ static int panel_lvds_probe(struct platform_device *pdev)
return 0;
error:
- put_device(&lvds->backlight->dev);
+ if (lvds->backlight)
+ put_device(&lvds->backlight->dev);
return ret;
}
--
2.20.1
next reply other threads:[~2019-09-04 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 10:03 Dan Carpenter [this message]
2019-09-04 11:50 ` [PATCH] drm: panel-lvds: Potential Oops in probe error handling Laurent Pinchart
2019-09-04 12:57 ` Dan Carpenter
2019-09-04 18:55 ` [PATCH v2] " Dan Carpenter
2019-09-04 21:48 ` Laurent Pinchart
2019-09-08 16:04 ` Sam Ravnborg
2019-09-10 13:32 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190904100329.GE7007@mwanda \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=lgirdwood@gmail.com \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).