summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-04-05 12:25:18 +0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-04-22 17:39:37 +0400
commite39a52da87fc49eeb0a91e7db3c30bd61e87bdb7 (patch)
tree0415b00dc9ed824cab9b2ebd6cdb11e609f1c1f8 /drivers/gpu/drm/udl
parent2ffd65283bcf120f6bac0d5954c7ccdb845fcbd5 (diff)
downloadlinux-e39a52da87fc49eeb0a91e7db3c30bd61e87bdb7.tar.xz
drm/udl: Initialize ret in udl_driver_load
We need to set it to -ENODEV when we don't recognize the device. Otherwise we return/print stack garbage. Spotted by coverity. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/udl')
-rw-r--r--drivers/gpu/drm/udl/udl_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index f5ae57406f34..e1038a945f40 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -294,6 +294,7 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
dev->dev_private = udl;
if (!udl_parse_vendor_descriptor(dev, dev->usbdev)) {
+ ret = -ENODEV;
DRM_ERROR("firmware not recognized. Assume incompatible device\n");
goto err;
}