Skip to content

Commit 1b93ce7

Browse files
kartbendkalowsk
authored andcommitted
drivers: sensor: paj7620: fix return value of paj7620_get_hw_id()
Use a local signed variable to store negative return values instead of unsigned previously so that errors are actually detected/returned. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent d9c935c commit 1b93ce7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/sensor/pixart/paj7620/paj7620.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int paj7620_select_register_bank(const struct device *dev, enum paj7620_m
4848

4949
static int paj7620_get_hw_id(const struct device *dev, uint16_t *result)
5050
{
51-
uint8_t ret;
51+
int ret;
5252
uint8_t hw_id[2];
5353
const struct paj7620_config *config = dev->config;
5454

0 commit comments

Comments
 (0)