Fix Coverity ID 547
[jra/samba/.git] / source / libnet / libnet_join.c
index d3fba167d95c2a500e7f91cd9e47171b3d7e6db6..52376ac8218f21b677a27625dfc16cfa11679ab1 100644 (file)
@@ -264,10 +264,7 @@ static ADS_STATUS libnet_unjoin_remove_machine_acct(TALLOC_CTX *mem_ctx,
        ADS_STATUS status;
 
        if (!r->in.ads) {
-               status = libnet_unjoin_connect_ads(mem_ctx, r);
-               if (!ADS_ERR_OK(status)) {
-                       return status;
-               }
+               return libnet_unjoin_connect_ads(mem_ctx, r);
        }
 
        status = ads_leave_realm(r->in.ads, r->in.machine_name);