ath9k: do not return invalid pointers as a *dentry
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 13:16:25 +0000 (14:16 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 7 Feb 2019 14:59:04 +0000 (16:59 +0200)
commitcd98625b3e3fd53b92323f781c0a80c039c23fbb
tree8c457af3760d075989c115636582e83fbb2dd770
parent056550291d983a1b0a36b4f018a46ca7d12eb75c
ath9k: do not return invalid pointers as a *dentry

When calling debugfs functions, they can now return error values if
something went wrong.  If that happens, return a NULL as a *dentry to
the relay core instead of passing it an illegal pointer.

The relay core should be able to handle an illegal pointer, but add this
check to be safe.

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/common-spectral.c