mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
crypto: cavium/nitrox - 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. Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Cc: Srikanth Jampala <Jampala.Srikanth@cavium.com> Cc: Yangtao Li <tiny.windzz@gmail.com> Cc: Gadam Sreerama <sgadam@cavium.com> Cc: Eric Biggers <ebiggers@google.com> Cc: linux-crypto@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
e30886b47c
commit
97a93b2b58
@@ -55,31 +55,14 @@ void nitrox_debugfs_exit(struct nitrox_device *ndev)
|
||||
ndev->debugfs_dir = NULL;
|
||||
}
|
||||
|
||||
int nitrox_debugfs_init(struct nitrox_device *ndev)
|
||||
void nitrox_debugfs_init(struct nitrox_device *ndev)
|
||||
{
|
||||
struct dentry *dir, *f;
|
||||
struct dentry *dir;
|
||||
|
||||
dir = debugfs_create_dir(KBUILD_MODNAME, NULL);
|
||||
if (!dir)
|
||||
return -ENOMEM;
|
||||
|
||||
ndev->debugfs_dir = dir;
|
||||
f = debugfs_create_file("firmware", 0400, dir, ndev,
|
||||
&firmware_fops);
|
||||
if (!f)
|
||||
goto err;
|
||||
f = debugfs_create_file("device", 0400, dir, ndev,
|
||||
&device_fops);
|
||||
if (!f)
|
||||
goto err;
|
||||
f = debugfs_create_file("stats", 0400, dir, ndev,
|
||||
&stats_fops);
|
||||
if (!f)
|
||||
goto err;
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
nitrox_debugfs_exit(ndev);
|
||||
return -ENODEV;
|
||||
debugfs_create_file("firmware", 0400, dir, ndev, &firmware_fops);
|
||||
debugfs_create_file("device", 0400, dir, ndev, &device_fops);
|
||||
debugfs_create_file("stats", 0400, dir, ndev, &stats_fops);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user