From patchwork Wed Jun 13 08:44:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 928760 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="dh111FmZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 415L0t1Frmz9ry1 for ; Wed, 13 Jun 2018 18:45:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 862BFC21DED; Wed, 13 Jun 2018 08:44:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A7680C21D4A; Wed, 13 Jun 2018 08:44:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 99BD1C21D4A; Wed, 13 Jun 2018 08:44:54 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 407C6C21C6A for ; Wed, 13 Jun 2018 08:44:54 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id p126-v6so3269094wmb.2 for ; Wed, 13 Jun 2018 01:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=q/eSv03JH/vOTTleoHUasYTpN92G3flArd7y0f5IXrA=; b=dh111FmZHSHN9yDQkrEAetXgT9nts1SY54gEJj5vpVmSfIbebnaAHMpXNL7nO5caQE bk6WwLvjn5IyTIfIBTdi1Q2jtv7LrnAorDh7n07mo8KnQ7pG2nNl+WgcjNPL/V0ozyXr VGS69GzEqAHVAabEPcl9q5L3PI1dkdMuErbRnWE913pYS2bXK4VD3p9oa8Pf+x4JZn7l 80Hznv8ftaIdmrkkdd5chVn/MbT8pWRhMIaUIm7+cthCwIZErIbZlL80hj/dFBmRHmVy VZx2g3iQ116YrvOWq/vFaWRY4i2abXI8hNYpwmRiVINGscOPeA9sPAjxAvqkIv82qMgr 6QwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=q/eSv03JH/vOTTleoHUasYTpN92G3flArd7y0f5IXrA=; b=NfZXcaUAyhmzzaFi5y6uYrNDtTaXcBNu8g/SyCyJiPDt1MQKglwsaKHVWR4gpXCvsU exYRbiiktDtYx+c6GyqpcyQVzgcDuefkY603XJBVwsmbxzbNZCs809WoFet3eyaAzLjb wdfR8x/nkDmSKJkZMZ6IyOKdr+e+0H7wlygo4JXKLrRlpETAPZFZTmfrqJAPoO+ekfGm wgDCstU69/K5EwCFdNSCU6viNhrVSQO2eI4g4Mzey0yV1PSiAukZjWmOTfawRlKkz2fi 2mqjbrNUBRQOLDB15A4a07Oov1Ox9JcIEqo9ic+1sZ7iq5b+dk42m281cKwDIG6yudSr WCfA== X-Gm-Message-State: APt69E26KQGU3giQH4q37/zR5PritMVSKEbbDm8yb8cEOCvKbnUw5NNF fmRRaRwtqkdUQRnSwOAnsHoOx/2q X-Google-Smtp-Source: ADUXVKK+JTVSdv1Lujs/7aAW8gtyJxg50/jrPS/oTENWeZdJONK0NC+kmLLud60B3fGpxMHGhb3JjQ== X-Received: by 2002:a1c:150d:: with SMTP id 13-v6mr3082095wmv.100.1528879493784; Wed, 13 Jun 2018 01:44:53 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id b8-v6sm2180710wrp.50.2018.06.13.01.44.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 13 Jun 2018 01:44:53 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Wed, 13 Jun 2018 10:44:52 +0200 Message-Id: <766fa417640f8446746e225f315cca1efd2285fc.1528879490.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] arm64: zynqmp: Check return value in zynqmp_mmio_rawwrite() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There should be return value check from zynqmp_mmio_read() in zynqmp_mmio_rawwrite() to make sure that errors are propagated properly. Signed-off-by: Michal Simek --- arch/arm/cpu/armv8/zynqmp/cpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c index e122be59c747..1279dc8658a1 100644 --- a/arch/arm/cpu/armv8/zynqmp/cpu.c +++ b/arch/arm/cpu/armv8/zynqmp/cpu.c @@ -212,8 +212,12 @@ static int zynqmp_mmio_rawwrite(const u32 address, { u32 data; u32 value_local = value; + int ret; + + ret = zynqmp_mmio_read(address, &data); + if (ret) + return ret; - zynqmp_mmio_read(address, &data); data &= ~mask; value_local &= mask; value_local |= data;