summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-03-18 08:42:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-22 22:22:13 -0400
commit3092c34a4ae6129d97c550d5191cf3e31d14b3ff (patch)
tree84b500dde267d617e892cc3fa30dd0831779312f /drivers/staging/lustre
parent2cc089e41d8e45752d85f42aefe66fabcd02bc57 (diff)
downloadlinux-3092c34a4ae6129d97c550d5191cf3e31d14b3ff.tar.bz2
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>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/mgc/mgc_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 65caffe8c42e..b7dc87248032 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -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;
}