Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp89107lqj; Wed, 10 Apr 2024 05:07:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXU2RkOIsRcQMLajBSm9RnvxBH6gVdjCKGff+zsJVZAwowkd1BwEVrnq2xolR39xRSj5cYpr6e2i/JFfESybPyr7UiD/Zg0ud1Bs4VuJg== X-Google-Smtp-Source: AGHT+IHempnyN1ndB1O2HnPJ1pEyt1R6yGcZ2oHc4TmKlqdfSa8R/mzNpTKdp7kEIkAxgL+chEc3 X-Received: by 2002:a17:902:bd89:b0:1e2:a40d:b742 with SMTP id q9-20020a170902bd8900b001e2a40db742mr2228017pls.56.1712750839497; Wed, 10 Apr 2024 05:07:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712750839; cv=pass; d=google.com; s=arc-20160816; b=zrPJ41UrdUMEIthqudaOicb6JdKx9N/cs72spOAM4QXeUlDoehGoZsE70urMoebVoj m9iXkMwfWbla2a+9gJgv8woVuYP9O+n76+SsuO3KBRmqpgH52z8VxdxDHXwHYREvB1nW wOOz+1OvRWeOFNyeW8l8gXV3cKay0N5uOK2L11jrDyaCyhmlhIAcoHMR1ZHns2n8/7Ut 3CDLA/MQ9+jbvL5JIhm3szH8xFaJNP9QY67H0UM4E++qzsG9CfWDRFeJXIi0RNhXQ0H8 fE3RsPXncG/AI0hGSJ5CqvBEI5YlP8dWypa72s8b7ZVYtstUaTT99BiYupPLXqeV0IEf nN0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=17G8EMAbpVc7ivr4G/hxNsKrvv7hQvHvUJgTFDy9El0=; fh=4UecbEpuXn5y8qMJtWpudMZ2PcXXnyh9KuIoVvKTnfQ=; b=Q9drzmfHDwHgvtO7efDIVCm+mYgWh86gxaK5SYB954r/1lEVEaMUjTi7YkCx6yz+Jm EVuY5XlWI8QZ1mAMnzzTMqhXrQOa08QRUGerukHkLiDZxBO41j9elUdQE6ibyuTuErqS U07WkjFXPWj9kx9Sp+aZSusq0TPNjD/wG3ZPobgcxODlGjX/fgc37zZ9NXiAYfM6CjQ+ EzPatO70/6v/L5yjcfbygodPqtQIJ/5OtbWVrbkrbA8X7Jy5s005BeBiIxLrANJ+PCI+ rrXnlE6pL5H46048VQZxBHJdEUBOEBiJxsqvuD3ZhdCoKnfMCgu7rx/djzChc32qb4ma bSNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LzkTexlU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n1-20020a170902d2c100b001dcaf709f55si10447872plc.207.2024.04.10.05.07.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LzkTexlU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CECC4B240A0 for ; Wed, 10 Apr 2024 11:59:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03D1215B154; Wed, 10 Apr 2024 11:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LzkTexlU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FE9F15B142 for ; Wed, 10 Apr 2024 11:58:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712750325; cv=none; b=qonpyIbGLIY8oBuTiJQdgwPCGrPU0CCfCswybRPLuR1GhLY2VYX6YdMoj2u1IhJdqPxNj/CN8G67NRroKn8AC+qtBy8cgAY3yfkmLQZjwYG1oGPdF+mngQztyqxD9lPscIN363t5iK+82a0IH0D1JogfPxO2GmcoHkgkPlTYpV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712750325; c=relaxed/simple; bh=miFooV5xlwUAoCg/5+WmOIw7hiB7FtagEK3Q2jQpBdo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DCzeHN2JABkNFCCXbTdNihU8nP9HMCjdS6XQuTR/hJ5TWfmuuGzyOZfwDwGDWwcqIHL10oKkw9NFZTWmNncanNxWooiQeLebvKTpvz8MYX+HNbEKEZshlcjfV0ymon/lKPUXczWO51mXEO1Vct5VmQdcEFjN+SpjgaOgCLcNlZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LzkTexlU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B724C43394; Wed, 10 Apr 2024 11:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712750324; bh=miFooV5xlwUAoCg/5+WmOIw7hiB7FtagEK3Q2jQpBdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LzkTexlUdZzTNblZagdSguoN7Auvwyg5ucQMjlq+cptVQwFQ4S867LO/VGgVQ25q1 VTUXuPxX2YRuFFbOfc+vkQY7WlmW5Jdt4DKt79iebKHmaX7ED+HaeoHFIT0C4ugRL+ rJgJeQsfQG7vm+75L4d7106btgyKMPzToYMmFkXkIS+VxRVQqrhSrvjrzFh3Ga72Gp LbgeBgxre8b7e4fJX64eavrDEv51lh66jxVdQb6vp/RIU6mjy0blehj1w31tybG7kY hfFnXfndpz7KzVwYlROXa+6YdsGM3E40qG5qSaBTLDqrFnbcD4/e2rWYvxmOVYVvlv Oplqn6rf66Z5g== From: Conor Dooley To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley , Daire McNamara , Cyril Jean , linux-kernel@vger.kernel.org Subject: [PATCH v1 2/5] firmware: microchip: don't unconditionally print validation success Date: Wed, 10 Apr 2024 12:58:05 +0100 Message-ID: <20240410-throwing-sandworm-7d03e4e2f4e8@spud> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410-opulently-epic-8654bdac3422@spud> References: <20240410-opulently-epic-8654bdac3422@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1033; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=bV+GMkr+Qxwo4lMIT/B+7/B5KMkZCVAYKLvbSQ6UzsY=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGlidVesmcN/GW7tkMwrORDPaLzTzH1p8vWTh5Zni3yrb YxN2vu3o5SFQYyDQVZMkSXxdl+L1Po/Ljuce97CzGFlAhnCwMUpABPZIszwv+z3nHNeM45xms/P ifjf1NKtIvw0wGjhOfO0BSdPGqxKsGRkmO7Y8GXVvIqnl019DRTuX808xacV1bN4xZo8zeDmY99 YuAE= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit From: Conor Dooley If validation fails, both prints are made. Skip the success one in the failure case. Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support") Signed-off-by: Conor Dooley --- drivers/firmware/microchip/mpfs-auto-update.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/microchip/mpfs-auto-update.c b/drivers/firmware/microchip/mpfs-auto-update.c index 33343e83373c..298ad21e139b 100644 --- a/drivers/firmware/microchip/mpfs-auto-update.c +++ b/drivers/firmware/microchip/mpfs-auto-update.c @@ -218,10 +218,12 @@ static int mpfs_auto_update_verify_image(struct fw_upload *fw_uploader) if (ret | response->resp_status) { dev_warn(priv->dev, "Verification of Upgrade Image failed!\n"); ret = ret ? ret : -EBADMSG; + goto free_message; } dev_info(priv->dev, "Verification of Upgrade Image passed!\n"); +free_message: devm_kfree(priv->dev, message); free_response: devm_kfree(priv->dev, response); -- 2.43.0