From patchwork Mon Jul 17 06:56:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 789245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x9vHR0Cksz9sRg for ; Mon, 17 Jul 2017 16:57:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="l+BACznJ"; dkim-atps=neutral Received: from localhost ([::1]:48287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWzy4-0002bi-P4 for incoming@patchwork.ozlabs.org; Mon, 17 Jul 2017 02:57:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWzxJ-0002a7-Sq for qemu-devel@nongnu.org; Mon, 17 Jul 2017 02:56:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWzxJ-0001Z3-2j for qemu-devel@nongnu.org; Mon, 17 Jul 2017 02:56:33 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:51901) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWzxI-0001X6-Nl; Mon, 17 Jul 2017 02:56:33 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3x9vGM0BBNz9t2s; Mon, 17 Jul 2017 16:56:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1500274587; bh=FGLHa6yFTNbSW5ZmTH0kpVCvoSxx1a2iLTix/mRDEJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l+BACznJapV8N+5r+JbyP3H71cQeFqFU+vVojpwhZPDgSz7uMgnyowCuklnl781ET FW/9bdLyNIZq7S0cSv9qnQjuAC8+0pjzbVAZSAaR9bv8PKmBNzjQoqtGjAywT2a/JR YYq8o0dbK32t37kKbml79LAr1bcAk3ssyJyNPN5Q= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 17 Jul 2017 16:56:07 +1000 Message-Id: <20170717065621.4688-8-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170717065621.4688-1-david@gibson.dropbear.id.au> References: <20170717065621.4688-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 07/21] spapr: Abort on delete failure in spapr_drc_release() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, aik@ozlabs.ru, mdroth@linux.vnet.ibm.com, groug@kaod.org, qemu-ppc@nongnu.org, sjitindarsingh@gmail.com, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We currently ignore errors from the object_property_del() in spapr_drc_release(). But the only way that could fail is if the property doesn't exist, in which case it's a bug that we're in spapr_drc_release() at all. So change from ignoring to abort()ing on errors. Signed-off-by: David Gibson --- hw/ppc/spapr_drc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 7f872a4803..fd5614094d 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -367,7 +367,7 @@ static void spapr_drc_release(sPAPRDRConnector *drc) g_free(drc->fdt); drc->fdt = NULL; drc->fdt_start_offset = 0; - object_property_del(OBJECT(drc), "device", NULL); + object_property_del(OBJECT(drc), "device", &error_abort); drc->dev = NULL; }