]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 13:17:16 +0000 (15:17 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 1 Aug 2019 12:56:07 +0000 (13:56 +0100)
commitb9be58cb69801d8d0193587d25628b9e22777b47
tree32c0504b9c690e77b33d30580302fb7051000a27
parent5916b32ca7fa90b5009460592c7859c2627b82f6
ASoC: SOF: no need to check return value of debugfs_create functions

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.

Also, if a debugfs call fails, userspace is notified with an error in
the log, so no need to log the error again.

Because we no longer need to check the return value, there's no need to
save the dentry returned by debugfs.  Just use the dentry in the file
pointer if we really need to figure out the "name" of the file being
opened.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20190731131716.9764-3-gregkh@linuxfoundation.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/debug.c
sound/soc/sof/sof-priv.h
sound/soc/sof/trace.c