Commit 944579c5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Thierry Reding

drm: Check the right variable when setting formats

When setting the video bus supported formats for a display device using
drm_display_info_set_bus_formats(), check for the proper variable after
duplicating memory.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 6edb2442
......@@ -787,7 +787,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment