aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/health.c
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2020-02-01 16:43:30 +0000
committerJakub Kicinski <kuba@kernel.org>2020-02-03 15:32:20 -0800
commit6556ff32f12d0a5380dd2fa6bbaa01373925a7d1 (patch)
tree28d6bff0ce10881ab7d85aca87965202f9ddbc9b /drivers/net/netdevsim/health.c
parentnetdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init() (diff)
downloadlinux-dev-6556ff32f12d0a5380dd2fa6bbaa01373925a7d1.tar.xz
linux-dev-6556ff32f12d0a5380dd2fa6bbaa01373925a7d1.zip
netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs
Debugfs APIs return valid pointer or error pointer. it doesn't return NULL. So, using IS_ERR is enough, not using IS_ERR_OR_NULL. Reviewed-by: Jakub Kicinski <kuba@kernel.org> Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/netdevsim/health.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/health.c b/drivers/net/netdevsim/health.c
index 9aa637d162eb..30595b1299bd 100644
--- a/drivers/net/netdevsim/health.c
+++ b/drivers/net/netdevsim/health.c
@@ -285,8 +285,8 @@ int nsim_dev_health_init(struct nsim_dev *nsim_dev, struct devlink *devlink)
}
health->ddir = debugfs_create_dir("health", nsim_dev->ddir);
- if (IS_ERR_OR_NULL(health->ddir)) {
- err = PTR_ERR_OR_ZERO(health->ddir) ?: -EINVAL;
+ if (IS_ERR(health->ddir)) {
+ err = PTR_ERR(health->ddir);
goto err_dummy_reporter_destroy;
}