drm/bridge: checking the wrong variable
Subsystems (3)
PATCH 1/1 drm/bridge: checking the wrong variable
We were supposed to check "fmts" here instead of "formats". I suppose it eventually leads to a NULL dereference.
drivers/gpu/drm/drm_crtc.c +1 -1
@@ -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 ; }
Hi Dan,
nit: this patch is not really for "drm/bridge".
Quoted 6 lines · Dan Carpenter
We were supposed to check "fmts" here instead of "formats". I suppose it eventually leads to a NULL dereference.
Signed-off-by Dan Carpenter <[email protected]>
Otherwise, good catch!
Quoted 18 lines
drivers/gpu/drm/drm_crtc.c +1
-1@@ -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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Daniel Kurtz
Hi Dan,
nit: this patch is not really for "drm/bridge".
Quoted 4 lines · Dan Carpenter
We were supposed to check "fmts" here instead of "formats". I suppose it eventually leads to a NULL dereference.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Dan Carpenter <[email protected]>Otherwise, good catch!
Reviewed-by Daniel Kurtz <[email protected]>
I've reworded the commit message slightly and applied this. Thanks.
Thierry