mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-09 04:48:05 +02:00
failing to get a device in the csr code isn't a bad error
This commit is contained in:
parent
5083edecd0
commit
f8a902dff9
1 changed files with 8 additions and 8 deletions
|
|
@ -170,6 +170,14 @@ dkp_csr_coldplug (DkpDevice *device)
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* try to get the usb device */
|
||||
csr->priv->device = dkp_csr_find_device (csr);
|
||||
if (csr->priv->device == NULL) {
|
||||
dkp_debug ("failed to get device %p", csr);
|
||||
ret = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* get optional quirk parameters */
|
||||
ret = devkit_device_has_property (d, "ID_CSR_HAS_SMS");
|
||||
if (ret)
|
||||
|
|
@ -189,14 +197,6 @@ dkp_csr_coldplug (DkpDevice *device)
|
|||
obj->battery_is_rechargeable = TRUE;
|
||||
obj->battery_state = DKP_DEVICE_STATE_DISCHARGING;
|
||||
|
||||
/* try to get the usb device */
|
||||
csr->priv->device = dkp_csr_find_device (csr);
|
||||
if (csr->priv->device == NULL) {
|
||||
dkp_warning ("failed to get %p", csr);
|
||||
ret = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* coldplug */
|
||||
ret = dkp_csr_refresh (device);
|
||||
out:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue