Expect non-zero value following allocation. If zeroed
reply to caller with -ENOMEM
This patch fixes a build issue reported by gcc 12
Fixes:
09f9fb3211 ("LU-11023 quota: quota pools for OSTs")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I2ce197c31bf444d9f179942e516cfd9bdaf7dd9c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52330
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
if (qti_lqes_inited(env) && qti_lqes_cnt(env) > QMT_MAX_POOL_NUM) {
OBD_ALLOC(qmt_info(env)->qti_lqes_rstr,
qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
- if (!qti_lqes_rstr(env))
+ if (!qmt_info(env)->qti_lqes_rstr)
rc = -ENOMEM;
}