to avoid the code duplication and ensure the consistent behaviour Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>