From patchwork Thu Jan 7 15:50:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 59295 Delivered-To: patches@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp632782lbb; Thu, 7 Jan 2016 07:51:05 -0800 (PST) X-Received: by 10.28.55.76 with SMTP id e73mr18332330wma.53.1452181840939; Thu, 07 Jan 2016 07:50:40 -0800 (PST) Return-Path: Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com. [2a00:1450:400c:c09::22f]) by mx.google.com with ESMTPS id b19si20585444wmf.57.2016.01.07.07.50.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jan 2016 07:50:40 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::22f as permitted sender) client-ip=2a00:1450:400c:c09::22f; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::22f as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-wm0-x22f.google.com with SMTP id f206so103045195wmf.0 for ; Thu, 07 Jan 2016 07:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K4npePiVlp7IzNuisXe138R97OdL6p9BCocSVzFXEkU=; b=VdojnZZ24MmUFXsjiibwhRqnPO0wtXkJlJ5PcOeI4fvBIXl8mnSYtvWPBuTebgnQtS LmmQvNhracYjcC36s43EiFyXLOA747SgcfI4Ia3m0bbnkNbVpX9revezxNEZNOjnw5+t QIicnylDouTt+qxuejCQ74YBA4zlM8lRWqpHo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K4npePiVlp7IzNuisXe138R97OdL6p9BCocSVzFXEkU=; b=BUpXcIVh+P/9o6oeuTQM1TQ7QQUs/S0YSheX0OTf8lbF4gmPTHoUbc7rF25co6uXEy lo/en0TNEMDzjtPsN3JqRRPVztM6lLqiSVKmAnlX4mNH0k7fhcVhlkI1a/9usKvB8vEG MUNuK71hrAwvE8ZmRGVNfYVxpjxBmVaX6r7csID7aV8oRTiv+6SPNZQsZOdRIQ1Hn8sZ qEQ+rjrSNk04+cS0Za5nLKgTHTMNbpkVzNz4SSji6Ji2J2ZTq7EFgAa6JB9VkDAbYs5H gmutHsyeJLX9z5c8WkZHXoS9yYP2iC7F37Y9XXwJI7DcA3puwZhJA43sme5nH+ovSjoh I8bg== X-Gm-Message-State: ALoCoQlSeIvP5tuBR1ljTRMNxSTaXHB1K1bV3BesRcqEbqpNskUjaomNy0riZlC36WsRGXhcK8L01iaVd6D1ald5OGGjqPZw/A== X-Received: by 10.194.93.102 with SMTP id ct6mr102733815wjb.157.1452181840485; Thu, 07 Jan 2016 07:50:40 -0800 (PST) Return-Path: Received: from new-host-8.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id e198sm14267576wmd.0.2016.01.07.07.50.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 07:50:38 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org, david@gibson.dropbear.id.au, alex.williamson@redhat.com Cc: alex.bennee@linaro.org, thuth@redhat.com, crosthwaitepeter@gmail.com, patches@linaro.org, christoffer.dall@linaro.org, pbonzini@redhat.com, b.reynal@virtualopensystems.com, suravee.suthikulpanit@amd.com, thomas.lendacky@amd.com Subject: [PATCH v3 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check Date: Thu, 7 Jan 2016 15:50:15 +0000 Message-Id: <1452181815-1948-9-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452181815-1948-1-git-send-email-eric.auger@linaro.org> References: <1452181815-1948-1-git-send-email-eric.auger@linaro.org> qemu_fdt_setprop self-exists in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) -- 1.9.1 diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 66fa766..68d7e53 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/arm/sysbus-fdt.c @@ -241,12 +241,8 @@ static int add_calxeda_midway_xgmac_fdt_node(SysBusDevice *sbdev, void *opaque) reg_attr[2 * i + 1] = cpu_to_be32( memory_region_size(&vdev->regions[i]->mem)); } - ret = qemu_fdt_setprop(fdt, nodename, "reg", reg_attr, - vbasedev->num_regions * 2 * sizeof(uint32_t)); - if (ret) { - error_report("could not set reg property of node %s", nodename); - goto fail_reg; - } + qemu_fdt_setprop(fdt, nodename, "reg", reg_attr, + vbasedev->num_regions * 2 * sizeof(uint32_t)); irq_attr = g_new(uint32_t, vbasedev->num_irqs * 3); for (i = 0; i < vbasedev->num_irqs; i++) { @@ -256,14 +252,9 @@ static int add_calxeda_midway_xgmac_fdt_node(SysBusDevice *sbdev, void *opaque) irq_attr[3 * i + 1] = cpu_to_be32(irq_number); irq_attr[3 * i + 2] = cpu_to_be32(GIC_FDT_IRQ_FLAGS_LEVEL_HI); } - ret = qemu_fdt_setprop(fdt, nodename, "interrupts", + qemu_fdt_setprop(fdt, nodename, "interrupts", irq_attr, vbasedev->num_irqs * 3 * sizeof(uint32_t)); - if (ret) { - error_report("could not set interrupts property of node %s", - nodename); - } g_free(irq_attr); -fail_reg: g_free(reg_attr); g_free(nodename); return ret;