From: Andrew Goodbody Date: Tue, 5 Aug 2025 10:34:29 +0000 (+0100) Subject: net: ks8851_mll: Remove unreachable code X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5deb50f749659746233e08060b457c9cf9986f9c;p=pandora-u-boot.git net: ks8851_mll: Remove unreachable code In ks8851_mll_detect_chip the if..else code detects the case of (val & 0xfff0) != CIDER_ID and returns if found. So testing for this again will always fail and the code is unreachable. Just remove the test and code block. This issue was found by Smatch. Signed-off-by: Andrew Goodbody --- diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index cc2e826257a..2c956154d09 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c @@ -347,11 +347,6 @@ static int ks8851_mll_detect_chip(struct ks_net *ks) debug("Read back KS8851 id 0x%x\n", val); - if ((val & 0xfff0) != CIDER_ID) { - printf(DRIVERNAME ": Unknown chip ID %04x\n", val); - return -1; - } - return 0; }