mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 19:08:34 +00:00
unifying: Do not allow closing a non-open device
This commit is contained in:
parent
38451999ff
commit
f1399580b5
@ -822,6 +822,10 @@ lu_device_close (LuDevice *device, GError **error)
|
|||||||
g_return_val_if_fail (LU_IS_DEVICE (device), FALSE);
|
g_return_val_if_fail (LU_IS_DEVICE (device), FALSE);
|
||||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||||
|
|
||||||
|
/* not open */
|
||||||
|
if (!lu_device_has_flag (device, LU_DEVICE_FLAG_IS_OPEN))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* subclassed */
|
/* subclassed */
|
||||||
g_debug ("closing device");
|
g_debug ("closing device");
|
||||||
if (klass->close != NULL) {
|
if (klass->close != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user