From 0c38eb62fa4c6e8aee4c882336779041295b314a Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 12 Aug 2008 11:10:14 +0100 Subject: [PATCH] don't force a refresh in DkpDevice if the coldplugging failed --- src/dkp-device.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dkp-device.c b/src/dkp-device.c index c4c602a..1cb1c99 100644 --- a/src/dkp-device.c +++ b/src/dkp-device.c @@ -286,15 +286,16 @@ dkp_device_coldplug (DkpDevice *device, DkpDaemon *daemon, DevkitDevice *d) device->priv->obj->native_path = g_strdup (native_path); /* coldplug source */ - dkp_debug ("coldplug %s", native_path); ret = klass->coldplug (device); + if (!ret) + goto out; + /* only put on the bus if we succeeded */ - if (ret) - dkp_device_register_device (device); + dkp_device_register_device (device); /* force a refresh */ dkp_device_refresh_internal (device); - +out: return ret; }