device: Return -EOPNOTSUPP if the device does not support scanning
[platform/upstream/connman.git] / src / device.c
index 30b7589..55a6d8e 100644 (file)
@@ -1171,7 +1171,7 @@ int __connman_device_request_scan(enum connman_service_type type)
        case CONNMAN_SERVICE_TYPE_GPS:
        case CONNMAN_SERVICE_TYPE_VPN:
        case CONNMAN_SERVICE_TYPE_GADGET:
-               return 0;
+               return -EOPNOTSUPP;
        case CONNMAN_SERVICE_TYPE_WIFI:
        case CONNMAN_SERVICE_TYPE_WIMAX:
                break;