mirror of https://github.com/nirenjan/libx52.git
Change return type of libx52_hotplug_exit
There is really no need for a return code, if the service pointer is NULL, or any of the parameters are NULL, then simply return.debian-packaging
parent
d45b1f7bfd
commit
79b1f930b8
|
@ -249,9 +249,9 @@ err_recovery:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libx52_hotplug_exit(libx52_hotplug_service *svc) {
|
void libx52_hotplug_exit(libx52_hotplug_service *svc) {
|
||||||
if (svc == NULL || svc->dev == NULL || svc->callbacks == NULL) {
|
if (svc == NULL || svc->dev == NULL || svc->callbacks == NULL) {
|
||||||
return LIBX52_ERROR_INVALID_PARAM;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Deregister the callback handle */
|
/* Deregister the callback handle */
|
||||||
|
@ -276,8 +276,6 @@ int libx52_hotplug_exit(libx52_hotplug_service *svc) {
|
||||||
/* Clear the service pointer before freeing it */
|
/* Clear the service pointer before freeing it */
|
||||||
memset(svc, 0, sizeof(*svc));
|
memset(svc, 0, sizeof(*svc));
|
||||||
free(svc);
|
free(svc);
|
||||||
|
|
||||||
return LIBX52_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int libx52_hotplug_register_callback(libx52_hotplug_service *svc,
|
int libx52_hotplug_register_callback(libx52_hotplug_service *svc,
|
||||||
|
|
Loading…
Reference in New Issue