From: Dan Carpenter Date: Tue, 15 Nov 2022 13:09:55 +0000 (+0300) Subject: net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b4b221bd79a1c698d9653e3ae2c3cb61cdc9aee7;p=linux.git net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() The rswitch_etha_wait_link_verification() is supposed to return zero on success or negative error codes. Unfortunately it is declared as a bool so the caller treats everything as success. Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Dan Carpenter Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/Y3OPo6AOL6PTvXFU@kili Signed-off-by: Paolo Abeni --- diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c index f3d27aef12869..c098b27093ea7 100644 --- a/drivers/net/ethernet/renesas/rswitch.c +++ b/drivers/net/ethernet/renesas/rswitch.c @@ -920,7 +920,7 @@ static void rswitch_etha_write_mac_address(struct rswitch_etha *etha, const u8 * etha->addr + MRMAC1); } -static bool rswitch_etha_wait_link_verification(struct rswitch_etha *etha) +static int rswitch_etha_wait_link_verification(struct rswitch_etha *etha) { iowrite32(MLVC_PLV, etha->addr + MLVC);