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 <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2025-08-05 11:34:29 +01:00
committed by Jerome Forissier
parent 90c05f68fc
commit 5deb50f749

View File

@@ -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;
}