Re: [PATCH v2 2/2] staging: sm750fb: propagate error codes from de_wait()

From: Greg Kroah-Hartman

Date: Sun Apr 26 2026 - 23:55:36 EST


On Thu, Apr 09, 2026 at 03:58:21PM +0000, Hungyu Lin wrote:
> The sm750 acceleration functions currently return -1 when
> de_wait() fails, discarding the original error code.
>
> Since de_wait() now returns proper errno values, propagate
> the error code instead of returning -1.

You can use the full 72 columns for a changelog text.

>
> Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>
> ---
> drivers/staging/sm750fb/sm750_accel.c | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> index 0f94d859e91c..688ec262a8ed 100644
> --- a/drivers/staging/sm750fb/sm750_accel.c
> +++ b/drivers/staging/sm750fb/sm750_accel.c
> @@ -90,14 +90,16 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
> u32 color, u32 rop)
> {
> u32 de_ctrl;
> + int ret;
>
> - if (accel->de_wait() != 0) {
> + ret = accel->de_wait();
> + if (ret) {
> /*
> - * int time wait and always busy,seems hardware
> + * int time wait and always busy, seems hardware

Nice fix, but not part of this change to make :(

thanks,

greg k-h