Re: [PATCH 1/6] staging: sm750fb: hw_sm750le_de_wait: return -ETIMEDOUT on timeout

From: Dan Carpenter

Date: Thu Mar 05 2026 - 00:33:58 EST


On Wed, Mar 04, 2026 at 11:05:24PM +0530, Soham Kute wrote:
> Return -ETIMEDOUT instead of -1 when the DE engine poll loop
> times out. The callers check for non-zero return value and
> propagate the error code back to their callers.
>

They don't propagate the error back. The callers do:

drivers/staging/sm750fb/sm750_accel.c
87 int sm750_hw_fillrect(struct lynx_accel *accel,
88 u32 base, u32 pitch, u32 Bpp,
89 u32 x, u32 y, u32 width, u32 height,
90 u32 color, u32 rop)
91 {
92 u32 de_ctrl;
93
94 if (accel->de_wait() != 0) {
95 /*
96 * int time wait and always busy,seems hardware
97 * got something error
98 */
99 pr_debug("De engine always busy\n");
100 return -1;
101 }

They return -1. Propagating the errors means:

ret = accel->de_wait();
if (ret)
return ret;

Also this is a v3 patch, it needs v3 in the subject and a little
description of what changed.

https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

regards,
dan carpenter