---
title: Stop
framework: usbserialdriverkit
role: symbol
role_heading: Instance Method
path: usbserialdriverkit/iouserusbserial/stop
---

# Stop

Stops the service that matches the specified provider.

## Declaration

```occ
virtual kern_return_t Stop(IOService *provider);
```

## Parameters

- `provider`: The provider associated with the current service. This object is the same one that the system previously passed to your service’s doc://com.apple.documentation/documentation/SerialDriverKit/IOUserSerial/Start method.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## Discussion

Discussion Before terminating a provider, the system calls this method to stop the service associated with that object. Use your implementation of this method to stop all activity and put your driver in a quiescent state. Call super at the end of your implementation. After you call super, it is a programmer error to access the provider object.

## See Also

### Configuring the Service

- [init](usbserialdriverkit/iouserusbserial/init.md)
- [Start](usbserialdriverkit/iouserusbserial/start.md)
- [free](usbserialdriverkit/iouserusbserial/free.md)
- [initWith](usbserialdriverkit/iouserusbserial/initwith.md)
