From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, sean@poorly.run, tiwai@suse.com,
patrik.r.jakobsson@gmail.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, sashiko-reviews@lists.linux.dev,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 06/11] drm/udl: Rework the error handling in udl_submit_urb()
Date: Thu, 19 Nov 2026 15:02:18 +0100 [thread overview]
Message-ID: <20261119142114.152052-7-tzimmermann@suse.de> (raw)
In-Reply-To: <20261119142114.152052-1-tzimmermann@suse.de>
Refactor the error handling in udl_submit_urb(). Replace DRM_ERROR()
macro with drm_err_ratelimited(). No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/udl/udl_main.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index 1c3960974a10..821725cbebbe 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -331,15 +331,21 @@ int udl_submit_urb(struct udl_device *udl, struct urb *urb, size_t len)
if (drm_WARN_ON_ONCE(drm, len > unode->alloc_size)) {
ret = -EINVAL;
- goto error;
+ goto err_udl_put_urb;
}
+
urb->transfer_buffer_length = len; /* set to actual payload len */
+
ret = usb_submit_urb(urb, GFP_ATOMIC);
- error:
if (ret) {
- udl_put_urb(urb);
- DRM_ERROR("usb_submit_urb error %x\n", ret);
+ drm_err_ratelimited(drm, "usb_submit_urb() failed with error %d\n", ret);
+ goto err_udl_put_urb;
}
+
+ return 0;
+
+ err_udl_put_urb:
+ udl_put_urb(urb);
return ret;
}
--
2.56.0
next prev parent reply other threads:[~2026-11-19 14:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 14:02 [PATCH 00/11] drm/udl: Rework URB allocation Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 01/11] drm/udl: Release URB in udl_put_urb() Thomas Zimmermann
2026-11-19 17:03 ` Jie Feng
2026-11-19 14:02 ` [PATCH 02/11] drm/udl: Do not use URB completion handler for error cleanup Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 03/11] drm/udl: Store per-URB allocation length in struct urb_node Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 04/11] drm/udl: Allocate bulk URBs in helper functions Thomas Zimmermann
2026-11-19 16:38 ` Jie Feng
2026-11-20 12:49 ` Thomas Zimmermann
2026-11-20 16:15 ` Jie Feng
2026-11-19 14:02 ` [PATCH 05/11] drm/udl: Free " Thomas Zimmermann
2026-11-19 14:02 ` Thomas Zimmermann [this message]
2026-11-19 14:02 ` [PATCH 07/11] drm/udl: Managed cleanup of URB cache Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 08/11] drm/udl: Track number of URBs in flight Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 09/11] drm/udl: Synchronize pending URBs on each frame Thomas Zimmermann
2026-11-20 6:50 ` Jie Feng
2026-11-20 12:52 ` Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 10/11] drm/udl: Allocate URBs on demand Thomas Zimmermann
2026-11-19 14:47 ` sashiko-bot
2026-11-19 18:05 ` Thomas Zimmermann
2026-11-20 6:54 ` Jie Feng
2026-11-20 13:01 ` Thomas Zimmermann
2026-11-19 14:02 ` [PATCH 11/11] drm/udl: Implement URB cache as LIFO stack Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119142114.152052-7-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=patrik.r.jakobsson@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.