[PATCH 5.10 343/599] powerpc/sysdev: fix incorrect use to determine if list is empty