staging: lustre: checking for NULL instead if IS_ERR
lustre_cfg_new() returns error pointers and never NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
33a2e390c4
commit
73bd2eaa87
|
@ -1427,8 +1427,8 @@ int class_manual_cleanup(struct obd_device *obd)
|
|||
lustre_cfg_bufs_reset(&bufs, obd->obd_name);
|
||||
lustre_cfg_bufs_set_string(&bufs, 1, flags);
|
||||
lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
|
||||
if (!lcfg)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(lcfg))
|
||||
return PTR_ERR(lcfg);
|
||||
|
||||
rc = class_process_config(lcfg);
|
||||
if (rc) {
|
||||
|
|
Loading…
Reference in New Issue