Re: [PATCH] brcm80211: no need to check return value of debugfs_create functions

From: Arend Van Spriel
Date: Tue Jan 22 2019 - 15:08:01 EST


The prefix should be 'brcmsmac'.

On 1/22/2019 4:21 PM, Greg Kroah-Hartman wrote:
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.

I could argue that if above is true it would be better to make the debugfs function return void, but I won't ;-p

In start_creating() the parent dentry is indeed checked for IS_ERR() so...

Acked-by: Arend van Spriel

Cc: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Cc: Franky Lin <franky.lin@xxxxxxxxxxxx>
Cc: Hante Meuleman <hante.meuleman@xxxxxxxxxxxx>
Cc: Chi-Hsien Lin <chi-hsien.lin@xxxxxxxxxxx>
Cc: Wright Feng <wright.feng@xxxxxxxxxxx>
Cc: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
Cc: linux-wireless@xxxxxxxxxxxxxxx
Cc: brcm80211-dev-list.pdl@xxxxxxxxxxxx
Cc: brcm80211-dev-list@xxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
.../broadcom/brcm80211/brcmsmac/debug.c | 26 +++----------------
.../broadcom/brcm80211/brcmsmac/debug.h | 2 +-
2 files changed, 5 insertions(+), 23 deletions(-)