From patchwork Mon Dec 14 22:17:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Germann X-Patchwork-Id: 1416209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13b; helo=mail-lf1-x13b.google.com; envelope-from=swupdate+bncbdpppp7kyilbb3wi377akgqest5z3oy@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=jhM8LHGj; dkim-atps=neutral Received: from mail-lf1-x13b.google.com (mail-lf1-x13b.google.com [IPv6:2a00:1450:4864:20::13b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cvwjx2Nkzz9s0b for ; Tue, 15 Dec 2020 09:17:23 +1100 (AEDT) Received: by mail-lf1-x13b.google.com with SMTP id i23sf8676892lfl.10 for ; Mon, 14 Dec 2020 14:17:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1607984238; cv=pass; d=google.com; s=arc-20160816; b=feUYGIEIkOtEeDQhql1baVSdRnO/vHs4JOZYa6vp7nvfNQSwNLxx9SoAigZwfyvv05 RiIVrggSgH2Z6DsA/Dr8CkNpk0MLkTVwTEhzJpTDDZtBTuImsKrIbvtnyqqx2JSJ3pvi 9HLuuesqo9MJKQzJpJLgdh+vWaWLWVWoutvSI/UDIpvMDwGPTLd6RG5Ly+EiCZzd75mH UHpjj9H/XVKjPNvTD1EGmEfFZO0GLKMAaA0HS2NOd6P2FJN5ucuux4qzYuZk1WN26uA4 F1pyhsXk0FYzo4G9uBAiIezOv7acGg2WTHzrI4a52CzhpmFc89Cgv78ix4sthVb7ukrJ inAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=owHVma2Lo9Eij+ABPrsto0JRT2AaR2FpMD6NnGNSn+g=; b=1JnGzavQ2oemIwl5S9KXp9aKoDPqDpe0rCUdTpHPtH5nqyUovR6XhWSEoLxgi/tlMb VRdC0LNft1hLyrBFGXGy8F0a0wqpgpEWS3gmAtS31UB3wHh3PXTWHVOHZsrFjvMdrqve B4k5kw4NyLEc/rgcvTwDbRoVY2oV6LxQO+JrjmnZ0zkhwQwmLHsG0IX+O+rVyTXsgGt+ wiHCxHP4xHORlOHmki/JCVzxzBi56qhZsaTPah+2tBY8Sk5xJJqJMIkdNK/tJ9dk8O8/ k+bUyldunNgxgKpE29f+KREhikYK5dT1w3aryxmKIMpoP+lHn0zNr7bBP+2hrubxFgWI FKvA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="Eq4wZe/g"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) smtp.mailfrom=bage@linutronix.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=owHVma2Lo9Eij+ABPrsto0JRT2AaR2FpMD6NnGNSn+g=; b=jhM8LHGjt2y35h0d81YhpRTyYcODKIHpHajKW0HCfimo4/UPIg4oQqyPsHTyuDp+0z bK7uVf7zas0irsq0to0J8y8yPbwo7zVMNFl0kdhKNK7XRnDHWE+0bDDP2/LmLLJlbh9T hc+BgObWy+7S9u/4/KKY//W8px8HhF5CqMNdUQ9uVfcIVM1flITrHoq54Y19axNqpE5T FVNsTB/pTlkxtzMZiJIkWuYb+BrAGW4H5dVrO3IwwO5V/bIpnl4DF1TW+yksqGWfGDkV LPoehjn+JgPwoyBnjGHdSLbbkrpe1H/89TzQbSo2uG0nRXL2yvTDAArfcBPfxM9rBeSx EQvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=owHVma2Lo9Eij+ABPrsto0JRT2AaR2FpMD6NnGNSn+g=; b=hDnx/WRXvOlYhuECpMa2M+pZV2eD3zzBet2wjQof5pnXnCCQhNJytumT6hACH0Bu1v LDy1vWv0AvxcwMvJxMwTcwce1kbWN0nARCYni9rAeraGhZhG+4kLUdWa5ORbLVtCTUHl eLCTNO+jZsfQ4iEyTRDsm03EBlcgVUpVOnktZsQ3d44SuyH4Tv/jsDliA7x5c8/PMdB7 SL0sO3aT1ofPF7pDTIKBhMRRXoWH1/D6ccn7KidGfagM4dH1JHoZ1Ea/bQp9EwoxtMWc XC9ffW626bXGE5LGmELdxDXbNHm8eAg1Gc0aztMhHTmAaYlMhO2AgNoVvBzKi6BGZ/AG wK0A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530WqNqHtgRJiZWCZobRuklAd7TXEovT/U68xAji9fsQYiB/zwum m6xRdU++3kwMSbA7r8MLKMg= X-Google-Smtp-Source: ABdhPJxiHxv2R6H7k78g0xRqVrHeeWbutjQQkWEHKUCgFG5oGtX4IvsFxgdQCsvT8IR3mIE0jod5SA== X-Received: by 2002:a19:4196:: with SMTP id o144mr11541524lfa.342.1607984238737; Mon, 14 Dec 2020 14:17:18 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:89d3:: with SMTP id c19ls211194ljk.0.gmail; Mon, 14 Dec 2020 14:17:17 -0800 (PST) X-Received: by 2002:a2e:9dd2:: with SMTP id x18mr11225037ljj.359.1607984237557; Mon, 14 Dec 2020 14:17:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607984237; cv=none; d=google.com; s=arc-20160816; b=aLZd98NAOusDx0vQf6BbKGtJEnVXhMsVZN1gEcjMbrWL48oqDQLUXO1nI0RASxiVdJ z2TArFuviuascsuY6caDOIxBQKbCfdL4OJKfwUSpi2rX8UOKY6UTwvzYOrLLetIGGo3I 4dmr5n4nX8ttpjPT3TySwez25BFR5T6hMr/VUtqt63oyfDI7bQVDJGUXYMELTRmpKo/k rU/XuaPlG6KAW4l4JMcb5H4jtmpYfL2LWUVvIuFcfjIGfVb/Lp3mUjcge8TFdLY8jTCv 98OYhdLJzeDByUvr9Tcdvb2OUNL5PQ2KIIlHd4TDShCrAuCKdAMwSot2vocEbbAKNUjo rzlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dkim-signature:dkim-signature:from; bh=eKnDaEgLhl1l3WGB/q83u/IOqL4Gq3D/L1+O8KkgieY=; b=QRKBjGjl+13uSodUCPoCPdPQntH4jZO52zMldCItzo+URco0tEfYAZp1nxsuY37XL2 MFuI+VM+BDCwJhpc6ritZ6mBsa7yeXciNXeWXVyosbZeLIOd7p1AOQHD0v9v/zksqd6D pIApF+zn4Iwg7R2F04sti8O44TeMEOl7Egg2676tq+xJYrjGVsjm31HpYM5aglsDqtCE ZmH4XyZYeVjJmx4Jzgy6AwLvnvQMK5Em6XMDmA0omwoTYToZHB5+X9odJ2uRbTkeiujK cEYVT4JhhKOxw/gF1nrAdAFhfiyYD9RQpNSVgPuqqzm3hc7n8By+tIbcAgAiX4dkLeX7 5xvQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="Eq4wZe/g"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) smtp.mailfrom=bage@linutronix.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from galois.linutronix.de (Galois.linutronix.de. [2a0a:51c0:0:12e:550::1]) by gmr-mx.google.com with ESMTPS id v191si797195lfa.9.2020.12.14.14.17.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 14:17:17 -0800 (PST) Received-SPF: pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) client-ip=2a0a:51c0:0:12e:550::1; From: bage@linutronix.de To: swupdate@googlegroups.com Cc: Bastian Germann Subject: [swupdate] [PATCH] handlers/swuforward_handler.c: Correct failing returns Date: Mon, 14 Dec 2020 23:17:11 +0100 Message-Id: <20201214221711.32367-1-bage@linutronix.de> MIME-Version: 1.0 X-Original-Sender: bage@linutronix.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="Eq4wZe/g"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of bage@linutronix.de designates 2a0a:51c0:0:12e:550::1 as permitted sender) smtp.mailfrom=bage@linutronix.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , From: Bastian Germann install_remote_swu() will return a good state in case of two error states. Fix them to return FAILURE like most of the other errors. Signed-off-by: Bastian Germann Acked-by: Stefano Babic --- handlers/swuforward_handler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handlers/swuforward_handler.c b/handlers/swuforward_handler.c index a1fdab3..1d94710 100644 --- a/handlers/swuforward_handler.c +++ b/handlers/swuforward_handler.c @@ -370,12 +370,14 @@ static int install_remote_swu(struct img_type *img, if (initialize_backchannel(&priv)) { ERROR("Cannot initialize back connection"); + ret = FAILURE; goto handler_exit; } ret = copyimage(&priv, img, swu_forward_data); if (ret) { ERROR("Transferring SWU image was not successful"); + ret = FAILURE; goto handler_exit; }