[PATCH 4.19 146/338] powerpc/sysdev: fix incorrect use to determine if list is empty