summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2014-05-19 13:50:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 16:03:58 -0700
commit737583f07e6267c60847e6c9a75e651277c08828 (patch)
tree248cb25968e68e9fd671fd0a0a5103c74ec8049b
parentc78d1ecfd7e639f21c7a809f4df6de1a644a91f0 (diff)
USB: udl: proper error reporting
Parsing device descriptors can fail due to a failed memory allocation. The error needs to be properly propagated to the upper layers. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/udl/udl_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index f5ae57406f34..afdf383f630a 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -283,7 +283,7 @@ int udl_submit_urb(struct drm_device *dev, struct urb *urb, size_t len)
int udl_driver_load(struct drm_device *dev, unsigned long flags)
{
struct udl_device *udl;
- int ret;
+ int ret = -ENOMEM;
DRM_DEBUG("\n");
udl = kzalloc(sizeof(struct udl_device), GFP_KERNEL);
@@ -299,7 +299,6 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
}
if (!udl_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) {
- ret = -ENOMEM;
DRM_ERROR("udl_alloc_urb_list failed\n");
goto err;
}