[PATCH 4.14 119/284] powerpc/sysdev: fix incorrect use to determine if list is empty