Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.5-branch] drivers: sensor: nxp: kinetis: temp: fix memset() length #73105

Merged
merged 2 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion drivers/sensor/nxp_kinetis_temp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ config TEMP_KINETIS
bool "NXP Kinetis Temperature Sensor"
default y
depends on DT_HAS_NXP_KINETIS_TEMPERATURE_ENABLED
depends on (ADC && SOC_FAMILY_KINETIS)
depends on SOC_FAMILY_KINETIS
select ADC
help
Enable driver for NXP Kinetis temperature sensor.

Expand Down
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
Loading