device: minor cleanup of code path in delete_cb()

(cherry picked from commit c68cbcb8fa)
(cherry picked from commit ae430f37ed64f7a78ee6912b39687a174113714d)
This commit is contained in:
Thomas Haller 2023-04-17 11:35:06 +02:00
parent 24ababea80
commit d07827dfe1
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -13429,10 +13429,13 @@ delete_cb(NMDevice *self,
/* Authorized */
nm_audit_log_device_op(NM_AUDIT_OP_DEVICE_DELETE, self, TRUE, NULL, subject, NULL);
if (nm_device_unrealize(self, TRUE, &local))
g_dbus_method_invocation_return_value(context, NULL);
else
if (!nm_device_unrealize(self, TRUE, &local)) {
g_dbus_method_invocation_take_error(context, local);
return;
}
g_dbus_method_invocation_return_value(context, NULL);
}
static void