[PATCH 5.4 206/475] powerpc/sysdev: fix incorrect use to determine if list is empty