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>
This commit is contained in:

committed by
Jakub Kicinski

parent
6fb8852b12
commit
6556ff32f1
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user