mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: ethernet: oa_tc6: return ERR_PTR from oa_tc6_init()
oa_tc6_init() returns NULL on failure, so the reason for the failure is lost and both callers turn it into a plain -ENODEV. In preparation for acquiring an optional reset GPIO, which can return -EPROBE_DEFER when the GPIO provider is not available yet, the error code has to reach the driver core, otherwise the SPI device would never be probed again. Convert oa_tc6_init() to return an ERR_PTR on failure instead of NULL, and update the lan865x and adin1140 callers to check with IS_ERR() and propagate the error with PTR_ERR(). Signed-off-by: Alessandro Zini <alessandro.zini@siemens.com> Link: https://patch.msgid.link/20260918231450.55966-3-alessandro.zini@siemens.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7afc23c988
commit
15358c2c3d
3 changed files with 18 additions and 17 deletions
Loading…
Add table
Add a link
Reference in a new issue