[PATCH 5.16 0579/1017] powerpc/sysdev: fix incorrect use to determine if list is empty