[PATCH 4.9 096/218] powerpc/sysdev: fix incorrect use to determine if list is empty