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

* Re: [patch] drm/bridge: checking the wrong variable
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Kurtz @ 2015-01-28  6:46 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: kernel-janitors, dri-devel

Hi Dan,

nit: this patch is not really for "drm/bridge".

On Wed, Jan 28, 2015 at 2:43 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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>
>

Otherwise, good catch!

Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>

>
> 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;
>         }
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [patch] drm/bridge: checking the wrong variable
  2015-01-28  6:46 ` Daniel Kurtz
@ 2015-01-28  7:59   ` Thierry Reding
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2015-01-28  7:59 UTC (permalink / raw)
  To: Daniel Kurtz; +Cc: kernel-janitors, dri-devel, Dan Carpenter

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

On Wed, Jan 28, 2015 at 02:46:46PM +0800, Daniel Kurtz wrote:
> Hi Dan,
> 
> nit: this patch is not really for "drm/bridge".
> 
> On Wed, Jan 28, 2015 at 2:43 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > 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>
> >
> 
> Otherwise, good catch!
> 
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>

I've reworded the commit message slightly and applied this. Thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[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).