summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-01-28 09:43:35 +0300
committerThierry Reding <treding@nvidia.com>2015-01-28 08:58:37 +0100
commit944579c5a474e5faffd3ff2ee0e45eb7c53c3fd3 (patch)
treee926929f5c8ff4f0ecdd3ce18e2c9b797617fb17 /drivers/gpu
parent6edb2442c0fbdb149f999c96334f2a2063f65835 (diff)
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')
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
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;
}