mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 07:51:31 -04:00
staging: fbtft: fix unchecked write return value in fb_agm1264k-fl
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> Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260207220523.3816-1-iprintercanon@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fbab250eb5
commit
f80760f5fc
@@ -376,7 +376,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",
|
||||
|
||||
Reference in New Issue
Block a user