forked from Minki/linux
staging: lustre: checking for NULL instead of IS_ERR
lustre_cfg_new() returns error pointers on error, it never returns NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2cc089e41d
commit
3092c34a4a
@ -1282,7 +1282,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc,
|
||||
|
||||
rc = -ENOMEM;
|
||||
lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
|
||||
if (!lcfg) {
|
||||
if (IS_ERR(lcfg)) {
|
||||
CERROR("mgc: cannot allocate memory\n");
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user