From 5bfd446e7bd94ee6f9c17d07b5d47342b96b387a Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Wed, 4 Nov 2015 13:40:06 -0500 Subject: [PATCH] staging: lustre: fix 'error handling' issues for libcfs workitem.c Fix 'error handling' issues found by Coverity version 6.5.1: Unchecked return value (CHECKED_RETURN) Calling function without checking return value. Signed-off-by: Sebastien Buisson Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3427 Reviewed-on: http://review.whamcloud.com/7103 Reviewed-by: Bobbie Lind Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/libcfs/workitem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/workitem.c b/drivers/staging/lustre/lustre/libcfs/workitem.c index 6d988084dbb6..b57acbfb061b 100644 --- a/drivers/staging/lustre/lustre/libcfs/workitem.c +++ b/drivers/staging/lustre/lustre/libcfs/workitem.c @@ -225,7 +225,9 @@ cfs_wi_scheduler (void *arg) /* CPT affinity scheduler? */ if (sched->ws_cptab != NULL) - cfs_cpt_bind(sched->ws_cptab, sched->ws_cpt); + if (cfs_cpt_bind(sched->ws_cptab, sched->ws_cpt) != 0) + CWARN("Failed to bind %s on CPT %d\n", + sched->ws_name, sched->ws_cpt); spin_lock(&cfs_wi_data.wi_glock); -- 2.20.1