Skip to content

Conversation

@duerrfk
Copy link

@duerrfk duerrfk commented May 4, 2025

Fixes #89449

The following assertion in the NXP PTP driver, function nxp_enet_ptp_clock_callback(), file zephyr/drivers/ptp_clock/ptp_clock_nxp_enet.c, is wrong:

__ASSERT(cb_data == NULL, "ptp data is NULL");

The intention is to ensure that cb_data is not NULL, therefore, the check should be for cb_data != NULL:

__ASSERT(cb_data != NULL, "ptp data is NULL");

@github-actions github-actions bot added platform: NXP Drivers NXP Semiconductors, drivers size: XS A PR changing only a single line of code area: Clocks labels May 4, 2025
Assertion checked whether pointer is NULL.
Assertion should check whether pointer is *not* NULL.
Fixed by changing check in assertion.

Signed-off-by: Frank Duerr <frank.duerr@ipvs.uni-stuttgart.de>
@duerrfk duerrfk force-pushed the issue_ptpdrv_invalid_assertion branch from aa15fec to 1932965 Compare May 6, 2025 06:57
@kartben kartben added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label May 15, 2025
@kartben kartben merged commit 8079ef5 into zephyrproject-rtos:main May 16, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Clocks platform: NXP Drivers NXP Semiconductors, drivers size: XS A PR changing only a single line of code Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NXP PTP Driver: invalid assertion

6 participants