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 <[email protected]>
(cherry picked from commit 59402fd)
  • Loading branch information
henrikbrixandersen authored and cfriedt committed May 21, 2024
1 parent 6909c26 commit 6477a75
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 6477a75

Please sign in to comment.