]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
auxdisplay: lcd2s: add error handling for i2c transfers
authorWang Jun <1742789905@qq.com>
Thu, 12 Mar 2026 14:51:36 +0000 (22:51 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 13 Mar 2026 10:00:06 +0000 (11:00 +0100)
commit995a418a6ca33e466e5e1527663ae3d5eee18304
treed73664e666c3f329bf34c552388141f7cb9195c3
parent398c0c8bbc8f5a9d2f43863275a427a9d3720b6f
auxdisplay: lcd2s: add error handling for i2c transfers

The lcd2s_print() and lcd2s_gotoxy() functions currently ignore the
return value of lcd2s_i2c_master_send(), which can fail. This can lead
to silent data loss or incorrect cursor positioning.

Add proper error checking: if the number of bytes sent does not match
the expected length, return -EIO; otherwise propagate any error code
from the I2C transfer.

Signed-off-by: Wang Jun <1742789905@qq.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/auxdisplay/lcd2s.c