kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] drm/bridge: checking the wrong variable
@ 2015-01-28  6:43 Dan Carpenter
  2015-01-28  6:46 ` Daniel Kurtz
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-01-28  6:43 UTC (permalink / raw)
  To: David Airlie; +Cc: kernel-janitors, dri-devel

We were supposed to check "fmts" here instead of "formats".  I suppose
it eventually leads to a NULL dereference.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 98fb640..8ae239f 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -783,7 +783,7 @@ int drm_display_info_set_bus_formats(struct drm_display_info *info,
 	if (formats && num_formats) {
 		fmts = kmemdup(formats, sizeof(*formats) * num_formats,
 			       GFP_KERNEL);
-		if (!formats)
+		if (!fmts)
 			return -ENOMEM;
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-28  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28  6:43 [patch] drm/bridge: checking the wrong variable Dan Carpenter
2015-01-28  6:46 ` Daniel Kurtz
2015-01-28  7:59   ` Thierry Reding

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).