From f8a902dff94fd0e0fec82803bba9344bff39816e Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 11 Aug 2008 10:28:31 +0100 Subject: [PATCH] failing to get a device in the csr code isn't a bad error --- src/dkp-csr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dkp-csr.c b/src/dkp-csr.c index c08f687..fb4cfe7 100644 --- a/src/dkp-csr.c +++ b/src/dkp-csr.c @@ -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: