Skip to content
Snippets Groups Projects
Commit b0675050 authored by Simon Glass's avatar Simon Glass
Browse files

dm: core: Add uclass_first_device_err() to return a valid device


A common pattern is to call uclass_first_device() and then check if it
actually returns a device. Add a new function which does this, returning
an error if there are no devices in that uclass.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent df61a74e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment