Re: [PATCH] mac80211: remove return value check of debugfs_create_dir()
From: Simon Horman
Date: Thu Apr 20 2023 - 10:55:58 EST
On Wed, Apr 19, 2023 at 06:45:47PM +0800, Yingsha Xu wrote:
> Smatch complains that:
> debugfs_hw_add() warn: 'statsd' is an error pointer or valid
>
> Debugfs checks are generally not supposed to be checked for errors
> and it is not necessary here.
>
> Just delete the dead code.
Perhaps:
As per it's documentation, it's expected that most callers
should ignore errors returned by debugfs_create_dir().
So just delete the unnecessary check.
> Signed-off-by: Yingsha Xu <ysxu@xxxxxxxxxxx>
> Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
In any case, the change looks good to me.
Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>