From: Dan Carpenter Date: Fri, 18 Mar 2016 05:42:47 +0000 (+0300) Subject: staging: lustre: checking for NULL instead of IS_ERR X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3092c34a4ae6129d97c550d5191cf3e31d14b3ff;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- 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; }