]> git.baikalelectronics.ru Git - kernel.git/commit
ionic: Remove unnecessary ternary operator in ionic_debugfs_add_ident
authorNathan Chancellor <natechancellor@gmail.com>
Tue, 17 Sep 2019 23:26:16 +0000 (16:26 -0700)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 19 Sep 2019 23:56:50 +0000 (16:56 -0700)
commite06e557424e6ccfd61f5b203a9ba058928ab5fea
tree64f6b650f214d4f1e5d59ed54635db420328ca84
parent5c96f59fff114a7fcc1b5b000c6abf5528c963b4
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: e10964c5bf37 ("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>
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c