From patchwork Mon Nov 8 07:56:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1552230 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=I32r4kYl; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hnk2x3Bjxz9sRK for ; Mon, 8 Nov 2021 18:56:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 362B183608; Mon, 8 Nov 2021 08:56:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="I32r4kYl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 38503835DD; Mon, 8 Nov 2021 08:56:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8DA9D835FD for ; Mon, 8 Nov 2021 08:56:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-wm1-x32a.google.com with SMTP id o29so8399172wms.2 for ; Sun, 07 Nov 2021 23:56:17 -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=TNGeMGzQ1BOr122NDXiacKY02vVRxcAbdrThVWX2RbE=; b=I32r4kYlPeMXjJvzTEDS4B9hkDs7FDWG94U+yAGpVdXgwP30xCdBVu4puyvu16kX82 zMcksf2NcOfdFYi7m3o8VIA8B+MDVQywVqIkdM670PWq3VP/vm/bzBM4APVk94TNNs99 sR5W/BM6d6NQPgmZa7bPQuUGPj7vIY9nQd4r0ETUT5QfrNJVsSctPnvv5mBpMs3c7bJL 30Y3nMXdKnh+jIwts5lt87ekolNaXqEUIus6mimCwwbObgyfAeVanqtH0ePZE1f0UGOU cgtJiYstFd3FTxTbhLHfjRvrtBRKhxMiN0EUtouBWANPvavH66IfeogBMEag0wEayw5n v1tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TNGeMGzQ1BOr122NDXiacKY02vVRxcAbdrThVWX2RbE=; b=tKCB+6iI/zdKV4XTT+53G6rqwwOHHHs7rS2IYWqE768C87s7DcDPB1VJaEog+KOR22 BTJRK47DTOvpXd0Ve4gnDax8DIRnsZWClCjzSKZDDecXI6Gm8T5CfBcmgqsVwATxckWf afTu8cBHJ9fWMbcW3Edk+TDTFT5AtkTRW0JyIWjggSUNE+aVRmAUGKr3a8JFc74wgHKZ 0Gs5VvqlMR2wtlB+4U+wNEVakiBpASwAsbNSP/NTTYUn1c3PO/PuIu6nuMsZSv8Ckg5h 7lqe3l9UZHdsqJdfMci3VByzp1nXkCSGK0BFwzvpoAv3PblVeQI7rqZTRF1JrWq1qa8T BO8w== X-Gm-Message-State: AOAM533O6O43hM4OHfkNd1CaR/nU0rXHFLFrMZpgr/EnLZL4WbjYw8XD 6n3gtWQUQafke1fvVotp6oh5/vezQsFgTw== X-Google-Smtp-Source: ABdhPJzRavDb6T+/er8C54DbSOp4qkj2m2qDklkLIsVhlqrfpH2gfqPRuVfDJjEHPynYKtVONNOmww== X-Received: by 2002:a7b:cb07:: with SMTP id u7mr50549098wmj.178.1636358177033; Sun, 07 Nov 2021 23:56:17 -0800 (PST) Received: from lmecxl0524.lme.st.com ([2a04:cec0:1097:d416:ed93:5b26:60a4:aace]) by smtp.gmail.com with ESMTPSA id t9sm17183725wrx.72.2021.11.07.23.56.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 23:56:16 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere , Simon Glass , Patrice Chotard , Patrick Delaunay Subject: [PATCH 2/5] firmware: scmi: mailbox transport: fix probe failure implementation Date: Mon, 8 Nov 2021 08:56:08 +0100 Message-Id: <20211108075611.30759-2-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108075611.30759-1-etienne.carriere@linaro.org> References: <20211108075611.30759-1-etienne.carriere@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Correct scmi mailbox probe function that can't free the scmi channel instance since its auto-allocated by the device model framework. Cc: Simon Glass Cc: Patrice Chotard Cc: Patrick Delaunay Signed-off-by: Etienne Carriere Reviewed-by: Patrick Delaunay --- Changes since v1: - No change. Patch re-send. --- drivers/firmware/scmi/mailbox_agent.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c index ea35e7e09e..eb841d692b 100644 --- a/drivers/firmware/scmi/mailbox_agent.c +++ b/drivers/firmware/scmi/mailbox_agent.c @@ -72,17 +72,13 @@ int scmi_mbox_probe(struct udevice *dev) ret = mbox_get_by_index(dev, 0, &chan->mbox); if (ret) { dev_err(dev, "Failed to find mailbox: %d\n", ret); - goto out; + return ret; } ret = scmi_dt_get_smt_buffer(dev, &chan->smt); if (ret) dev_err(dev, "Failed to get shm resources: %d\n", ret); -out: - if (ret) - devm_kfree(dev, chan); - return ret; }