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>
This commit is contained in:
parent
2ffd65283b
commit
e39a52da87
|
@ -294,6 +294,7 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
|
||||||
dev->dev_private = udl;
|
dev->dev_private = udl;
|
||||||
|
|
||||||
if (!udl_parse_vendor_descriptor(dev, dev->usbdev)) {
|
if (!udl_parse_vendor_descriptor(dev, dev->usbdev)) {
|
||||||
|
ret = -ENODEV;
|
||||||
DRM_ERROR("firmware not recognized. Assume incompatible device\n");
|
DRM_ERROR("firmware not recognized. Assume incompatible device\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue