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

net: l2: ethernet: check dev->api and get_capabilities for being NULL #77841

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

panekmaciej
Copy link
Contributor

@panekmaciej panekmaciej commented Aug 31, 2024

Adds missing checks for get_capabilities method not being NULL. Fixes crash with netusb and possibly other drivers.
See #77838

Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but the commit should split to three parts as you are also changing two other callbacks.

subsys/net/l2/ethernet/ethernet.c Outdated Show resolved Hide resolved
subsys/net/l2/ethernet/ethernet.c Outdated Show resolved Hide resolved
… NULL

Adds missing checks for get_capabilities method not being NULL.
Fixes crash with netusb and possibly other drivers.

Signed-off-by: Maciej Panek <[email protected]>
jukkar
jukkar previously approved these changes Sep 1, 2024
adds a check for "send" method in Ethernet driver's API
not being NULL in ethernet_send

Signed-off-by: Maciej Panek <[email protected]>
adds a check for Ethernet driver's API not being NULL
in ethernet_mcast_monitor_cb

Signed-off-by: Maciej Panek <[email protected]>
@carlescufi carlescufi merged commit 532b279 into zephyrproject-rtos:main Sep 4, 2024
24 checks passed
Copy link

github-actions bot commented Sep 4, 2024

Hi @panekmaciej!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants