From: Daniel Vetter Date: Sat, 5 Apr 2014 08:25:18 +0000 (+0200) Subject: drm/udl: Initialize ret in udl_driver_load X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e39a52da87fc49eeb0a91e7db3c30bd61e87bdb7;p=linux-beck.git 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 Signed-off-by: Daniel Vetter --- 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; }