mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 18:36:39 +07:00
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: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
6edb2442c0
commit
944579c5a4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user