Cleanup: remove dead code and return the correct return code
Coverity CID 207700 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3ce7230788
commit
6b2757955f
@ -213,17 +213,10 @@ error_free:
|
|||||||
static dc_status_t
|
static dc_status_t
|
||||||
uwatec_smart_device_close (dc_device_t *abstract)
|
uwatec_smart_device_close (dc_device_t *abstract)
|
||||||
{
|
{
|
||||||
dc_status_t status = DC_STATUS_SUCCESS;
|
|
||||||
uwatec_smart_device_t *device = (uwatec_smart_device_t*) abstract;
|
uwatec_smart_device_t *device = (uwatec_smart_device_t*) abstract;
|
||||||
dc_status_t rc = DC_STATUS_SUCCESS;
|
|
||||||
|
|
||||||
// Close the device.
|
// Close the device and pass up the return code.
|
||||||
rc = dc_iostream_close (device->iostream);
|
return dc_iostream_close (device->iostream);
|
||||||
if (status != DC_STATUS_SUCCESS) {
|
|
||||||
dc_status_set_error(&status, rc);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user