drivers: adc: lmp90xxx: fix incorrect buffer size
sizeof() reported the size of the val pointer, not the variable size. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
bbf63d364e
commit
2352da2e56
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ static int lmp90xxx_read_reg(const struct device *dev, uint8_t addr,
|
|||
static int lmp90xxx_read_reg8(const struct device *dev, uint8_t addr,
|
||||
uint8_t *val)
|
||||
{
|
||||
return lmp90xxx_read_reg(dev, addr, val, sizeof(val));
|
||||
return lmp90xxx_read_reg(dev, addr, val, sizeof(*val));
|
||||
}
|
||||
|
||||
static int lmp90xxx_write_reg(const struct device *dev, uint8_t addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue