src/sys/dev/sound/macio/onyx.c:203]: (style) Expression is always false because 'else if' condition matches previous condition at line 200. Source code is if (strcmp(name, "codec") == 0) { if (iicbus_get_addr(dev) != PCM3052_IICADDR) return (ENXIO); } else if (strcmp(name, "codec") == 0) { compat = ofw_bus_get_compat(dev); if (compat == NULL || strcmp(compat, "pcm3052") != 0) return (ENXIO);
https://reviews.freebsd.org/D47167
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6f96ef84b359137a51dc1e717887ca7d31ba7bad commit 6f96ef84b359137a51dc1e717887ca7d31ba7bad Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-10-18 08:41:55 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-10-18 08:41:55 +0000 onyx: Remove unreachable if condition Both conditions are the same, so the second one is unreachable. PR: 229550 Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: andreast, markj Differential Revision: https://reviews.freebsd.org/D47167 sys/dev/sound/macio/onyx.c | 1 - 1 file changed, 1 deletion(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e609dfa98fd349ed868f2d4d16bd1994fc53875f commit e609dfa98fd349ed868f2d4d16bd1994fc53875f Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-10-18 08:41:55 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-10-20 11:21:06 +0000 onyx: Remove unreachable if condition Both conditions are the same, so the second one is unreachable. PR: 229550 Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: andreast, markj Differential Revision: https://reviews.freebsd.org/D47167 (cherry picked from commit 6f96ef84b359137a51dc1e717887ca7d31ba7bad) sys/dev/sound/macio/onyx.c | 1 - 1 file changed, 1 deletion(-)