diff options
| author | Simon Glass <[email protected]> | 2023-06-01 10:22:30 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-07-14 12:54:50 -0400 |
| commit | 11c341b118a236423a294a7d62f71bf33e20aea3 (patch) | |
| tree | 2f5935b7941a59074666ee83e9983d169254137b /drivers/core/ofnode.c | |
| parent | 18030d9fa225569cc0ff3e87baca52c6e2558e91 (diff) | |
gpio: Avoid using an invalid ofnode
Devices do not necessarily have nodes attached to them, since they can be
created from platdata. In SPL a devicetree may in fact not exist at all.
Check the node before using it. This avoids failure when OF_CHECKS is
enabled.
Signed-off-by: Simon Glass <[email protected]>
Fixes: 5fc7cf8c8e2 ("gpio: add gpio-hog support")
Reviewed-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'drivers/core/ofnode.c')
0 files changed, 0 insertions, 0 deletions
