staging/lustre/libcfs: fix issues found by Klocwork Insight tool