Re: [PATCH 1/2] wifi: mt7601u: delete dead code checking debugfs returns

From: Jakub Kicinski
Date: Thu Apr 20 2023 - 10:33:43 EST


On Thu, 20 Apr 2023 13:08:14 +0000 Wang Jikai wrote:
> Smatch reports that:
> drivers/net/wireless/mediatek/mt7601u/debugfs.c:130
> mt7601u_init_debugfs() warn: 'dir' is an error pointer or valid".
>
> Debugfs code is not supposed to need error checking so instead of
> changing this to if (IS_ERR()) the correct thing is to just delete
> the dead code.
>
> Fixes: c869f77d6abb ("add mt7601u driver")

Don't add a Fixes tag on this cleanup.
one - dead code is not a bug
two - the semantics have changed since the driver was added
so it's certainly not the right Fixes tag