Re: [patch] drm/bridge: checking the wrong variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

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

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

Otherwise, good catch!

Reviewed-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx>

>
> 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@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux