diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-09-18 02:26:16 +0300 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-09-20 02:56:50 +0300 |
commit | b47bea2b5c3bf17270defe8529774dad114bcee5 (patch) | |
tree | 64f6b650f214d4f1e5d59ed54635db420328ca84 /drivers/net/ethernet/pensando | |
parent | 280ceaed79f18db930c0cc8bb21f6493490bf29c (diff) | |
download | linux-b47bea2b5c3bf17270defe8529774dad114bcee5.tar.xz |
ionic: Remove unnecessary ternary operator in ionic_debugfs_add_ident
clang warns:
../drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: warning:
expression result unused [-Wunused-value]
ionic, &identity_fops) ? 0 : -EOPNOTSUPP;
^~~~~~~~~~~
1 warning generated.
The return value of debugfs_create_file does not need to be checked [1]
and the function returns void so get rid of the ternary operator, it is
unnecessary.
[1]: https://lore.kernel.org/linux-mm/20150815160730.GB25186@kroah.com/
Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Link: https://github.com/ClangBuiltLinux/linux/issues/658
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/pensando')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c index 7afc4a365b75..bc03cecf80cc 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c @@ -57,7 +57,7 @@ DEFINE_SHOW_ATTRIBUTE(identity); void ionic_debugfs_add_ident(struct ionic *ionic) { debugfs_create_file("identity", 0400, ionic->dentry, - ionic, &identity_fops) ? 0 : -EOPNOTSUPP; + ionic, &identity_fops); } void ionic_debugfs_add_sizes(struct ionic *ionic) |