utils: Some changes to module functions.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
redundant length check,  use ```if lsmod``` to check if lsmod is empty.