Skip to content

Commit

Permalink
drivers: sensor: nxp: kinetis: temp: fix memset() length
Browse files Browse the repository at this point in the history
Use the correct buffer size when calling memset().

Fixes: #73093

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 59402fd)
  • Loading branch information
henrikbrixandersen committed May 21, 2024
1 parent 6909c26 commit 7c6eaae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/sensor/nxp_kinetis_temp/temp_kinetis.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int temp_kinetis_init(const struct device *dev)
},
};

memset(&data->buffer, 0, ARRAY_SIZE(data->buffer));
memset(&data->buffer, 0, sizeof(data->buffer));

if (!device_is_ready(config->adc)) {
LOG_ERR("ADC device is not ready");
Expand Down

0 comments on commit 7c6eaae

Please sign in to comment.