]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/udl: Initialize ret in udl_driver_load
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 5 Apr 2014 08:25:18 +0000 (10:25 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 22 Apr 2014 13:39:37 +0000 (15:39 +0200)
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>
drivers/gpu/drm/udl/udl_main.c

index f5ae57406f3447eacf3dbce309583ae303628824..e1038a945f40c6d34ed0aa1635678b3d5c9ac087 100644 (file)
@@ -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;
        }