From dd4ee256c34235e221883ed59e2d224b65f4e098 Mon Sep 17 00:00:00 2001 From: Jani Paalijarvi Date: Tue, 7 Jan 2025 10:57:31 +0200 Subject: [PATCH] arch/risc-v/src/mpfs/mpfs_ethernet.c: Set correct return value Return error in case of mpfs_i2cbus_initialize() failure. Signed-off-by: Jani Paalijarvi --- arch/risc-v/src/mpfs/mpfs_ethernet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/risc-v/src/mpfs/mpfs_ethernet.c b/arch/risc-v/src/mpfs/mpfs_ethernet.c index 79f861635c..b47d5cdf7b 100644 --- a/arch/risc-v/src/mpfs/mpfs_ethernet.c +++ b/arch/risc-v/src/mpfs/mpfs_ethernet.c @@ -3357,6 +3357,10 @@ static int mpfs_phyinit(struct mpfs_ethmac_s *priv) { ret = ksz9477_i2c_init(bus, KSZ9477_PORT_SGMII); } + else + { + ret = -EINVAL; + } #endif