Merge pull request #2834 from coling/master
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Mar 2016 12:23:52 +0000 (08:23 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Mar 2016 12:31:08 +0000 (08:31 -0400)
1  2 
src/core/device.c

@@@ -318,7 -318,7 +318,7 @@@ static int device_setup_unit(Manager *m
           * the GC to have garbaged it. That's desired since the device
           * unit may have a dependency on the mount unit which was
           * added during the loading of the later. */
-         if (u && DEVICE(u)->state == DEVICE_PLUGGED) {
 -        if (sysfs && u && DEVICE(u)->state == DEVICE_PLUGGED) {
++        if (dev && u && DEVICE(u)->state == DEVICE_PLUGGED) {
                  /* This unit is in plugged state: we're sure it's
                   * attached to a device. */
                  if (!path_equal(DEVICE(u)->sysfs, sysfs)) {