mirror of
https://git.proxmox.com/git/fwupd
synced 2025-06-03 17:04:54 +00:00
logitech-hidpp: Only shutdown the IO channel if it was created
This commit is contained in:
parent
6174425ee1
commit
35d37f8d2c
@ -180,9 +180,11 @@ static gboolean
|
||||
fu_logitech_hidpp_peripheral_close (FuDevice *device, GError **error)
|
||||
{
|
||||
FuLogitechHidPpPeripheral *self = FU_UNIFYING_PERIPHERAL (device);
|
||||
if (!fu_io_channel_shutdown (self->io_channel, error))
|
||||
return FALSE;
|
||||
g_clear_object (&self->io_channel);
|
||||
if (self->io_channel != NULL) {
|
||||
if (!fu_io_channel_shutdown (self->io_channel, error))
|
||||
return FALSE;
|
||||
g_clear_object (&self->io_channel);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,11 @@ static gboolean
|
||||
fu_logitech_hidpp_runtime_close (FuDevice *device, GError **error)
|
||||
{
|
||||
FuLogitechHidPpRuntime *self = FU_UNIFYING_RUNTIME (device);
|
||||
if (!fu_io_channel_shutdown (self->io_channel, error))
|
||||
return FALSE;
|
||||
g_clear_object (&self->io_channel);
|
||||
if (self->io_channel != NULL) {
|
||||
if (!fu_io_channel_shutdown (self->io_channel, error))
|
||||
return FALSE;
|
||||
g_clear_object (&self->io_channel);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user