dumpsys: fix error condition

Bug: 27809529
Change-Id: Ia2bdac83a367e1dd550ea7a5b50eac14d84f66b2
Signed-off-by: Thierry Strudel <tstrudel@google.com>
diff --git a/cmds/dumpsys/dumpsys.cpp b/cmds/dumpsys/dumpsys.cpp
index db06e99..7e5bbc5 100644
--- a/cmds/dumpsys/dumpsys.cpp
+++ b/cmds/dumpsys/dumpsys.cpp
@@ -138,13 +138,12 @@
     }
 
     if ((skipServices && skippedServices.empty()) ||
-            (!skipServices && !showListOnly && services.empty()) ||
             (showListOnly && (!services.empty() || !skippedServices.empty()))) {
         usage();
         return -1;
     }
 
-    if (!skippedServices.empty() || showListOnly) {
+    if (services.empty() || showListOnly) {
         // gets all services
         services = sm->listServices();
         services.sort(sort_func);