[PATCH openEuler-5.10 326/557] powerpc/sysdev: fix incorrect use to determine if list is empty