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:
Alessandro Zini 2026-09-19 01:14:49 +02:00 • committed by Jakub Kicinski
commit 15358c2c3d
3 changed files with 18 additions and 17 deletions