[PATCH 09/13] drm/udl: Initialize ret in udl_driver_load
Daniel Vetter
daniel.vetter at ffwll.ch
Sat Apr 5 02:44:58 PDT 2014
We need to set it to -ENODEV when we don't recognize the device.
Otherwise we return/print stack garbage.
Spotted by coverity.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/udl/udl_main.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
1.8.5.2
More information about the dri-devel
mailing list