drivers: display: display_rm67162: fix unsigned compare against 0
"wlen" variable set to return value of mipi_dsi_transfer should be a ssize_t type, so that if a negative value is returned the error will be caught and returned. Fixes #81929 Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
d7c9c4505c
commit
4d24120dcf
1 changed files with 2 additions and 2 deletions
|
@ -350,7 +350,7 @@ static int rm67162_write_fb(const struct device *dev, bool first_write,
|
||||||
const uint8_t *src, uint32_t len)
|
const uint8_t *src, uint32_t len)
|
||||||
{
|
{
|
||||||
const struct rm67162_config *config = dev->config;
|
const struct rm67162_config *config = dev->config;
|
||||||
uint32_t wlen = 0;
|
ssize_t wlen;
|
||||||
struct mipi_dsi_msg msg = {0};
|
struct mipi_dsi_msg msg = {0};
|
||||||
|
|
||||||
/* Note- we need to set custom flags on the DCS message,
|
/* Note- we need to set custom flags on the DCS message,
|
||||||
|
@ -368,7 +368,7 @@ static int rm67162_write_fb(const struct device *dev, bool first_write,
|
||||||
msg.tx_buf = src;
|
msg.tx_buf = src;
|
||||||
wlen = mipi_dsi_transfer(config->mipi_dsi, config->channel, &msg);
|
wlen = mipi_dsi_transfer(config->mipi_dsi, config->channel, &msg);
|
||||||
if (wlen < 0) {
|
if (wlen < 0) {
|
||||||
return wlen;
|
return (int)wlen;
|
||||||
}
|
}
|
||||||
/* Advance source pointer and decrement remaining */
|
/* Advance source pointer and decrement remaining */
|
||||||
src += wlen;
|
src += wlen;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue