diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-01-28 09:43:35 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2015-01-28 10:58:37 +0300 |
commit | 944579c5a474e5faffd3ff2ee0e45eb7c53c3fd3 (patch) | |
tree | e926929f5c8ff4f0ecdd3ce18e2c9b797617fb17 /drivers/gpu/drm/drm_crtc.c | |
parent | 6edb2442c0fbdb149f999c96334f2a2063f65835 (diff) | |
download | linux-944579c5a474e5faffd3ff2ee0e45eb7c53c3fd3.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 0e4ec700b0a6..6b00173d1be4 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -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; } |