Commit 73bd2eaa authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: lustre: checking for NULL instead if IS_ERR

lustre_cfg_new() returns error pointers and never NULL.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33a2e390
...@@ -1427,8 +1427,8 @@ int class_manual_cleanup(struct obd_device *obd) ...@@ -1427,8 +1427,8 @@ int class_manual_cleanup(struct obd_device *obd)
lustre_cfg_bufs_reset(&bufs, obd->obd_name); lustre_cfg_bufs_reset(&bufs, obd->obd_name);
lustre_cfg_bufs_set_string(&bufs, 1, flags); lustre_cfg_bufs_set_string(&bufs, 1, flags);
lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs); lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
if (!lcfg) if (IS_ERR(lcfg))
return -ENOMEM; return PTR_ERR(lcfg);
rc = class_process_config(lcfg); rc = class_process_config(lcfg);
if (rc) { if (rc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment