[PATCH 5.15 522/913] powerpc/sysdev: fix incorrect use to determine if list is empty