public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: fix unchecked write return value in fb_agm1264k-fl
@ 2026-02-07 22:05 Artem Lytkin
  2026-02-08 13:46 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Lytkin @ 2026-02-07 22:05 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman
  Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel, Artem Lytkin

The second call to par->fbtftops.write() does not capture the return
value, so the subsequent error check tests a stale value from the
first write call. Add the missing assignment so the error check
applies to the correct write operation.

Signed-off-by: Artem Lytkin <iprintercanon@gmail.com>
---
 drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c
index 207d57854..b4883c365 100644
--- a/drivers/staging/fbtft/fb_agm1264k-fl.c
+++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
@@ -375,7 +375,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 
 			/* write bitmap */
 			gpiod_set_value(par->RS, 1); /* RS->1 (data mode) */
-			par->fbtftops.write(par, buf, len);
+			ret = par->fbtftops.write(par, buf, len);
 			if (ret < 0)
 				dev_err(par->info->device,
 					"write failed and returned: %d\n",
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: fbtft: fix unchecked write return value in fb_agm1264k-fl
  2026-02-07 22:05 [PATCH] staging: fbtft: fix unchecked write return value in fb_agm1264k-fl Artem Lytkin
@ 2026-02-08 13:46 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2026-02-08 13:46 UTC (permalink / raw)
  To: Artem Lytkin
  Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

On Sat, Feb 07, 2026 at 10:05:23PM +0000, Artem Lytkin wrote:
> The second call to par->fbtftops.write() does not capture the return
> value, so the subsequent error check tests a stale value from the
> first write call. Add the missing assignment so the error check
> applies to the correct write operation.

Hmm... Sounds about right, but it was like that from the day 1.
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-08 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-07 22:05 [PATCH] staging: fbtft: fix unchecked write return value in fb_agm1264k-fl Artem Lytkin
2026-02-08 13:46 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox