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: 518024 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp3208142iml; Sun, 7 Nov 2021 23:56:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgYl5lL07CyPm8gq/6nvi9viq/kAvcLAG4HRraKT4+LltsfjIQrqFp0Y+2JyZDyQ7fSVan X-Received: by 2002:a05:6402:17db:: with SMTP id s27mr99967742edy.325.1636358199230; Sun, 07 Nov 2021 23:56:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636358199; cv=none; d=google.com; s=arc-20160816; b=sBKToHOZ45lOL2022PPnREcIQEksRMdqz4PravsDASqlnWOhpBesoZF6ZMMRqEcuF7 CmvKgdJiN4YtqHNQV/o5GlqSMjsdaEIOO1FYN1hbT9tuGg9ugJ6Lb0+TqDVNdsvOoGKP Uqy0zERGODfLh6vs39Jr8s8Wm49q6IX74tfIzE5Os8Sh9TkxbVQUNfdVATURnM/U0nOC BrifgLfvajjTXgahD3hI9btOTsVs63qKtFS4wVQgTZ9aQip64rNhzFMFiFbAmByigeUO Cjcj3+y3akBlxI6U5Dnw58pVyKbAmXsJAkTcF3Papve8TTcXcy3HqHsja0AXeXXVO17R 0mew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TNGeMGzQ1BOr122NDXiacKY02vVRxcAbdrThVWX2RbE=; b=Cr7U251JQs3AElN4kBIfLJ4bPvsvqw0lHky8DmO2QnuILW12p0lmpIV7QtADT4na1Z hbqkB47LkMUo8oKQR30xS5D/zuVYQrDHbNi1dHsLpG0AZmqB7tkNzx0fH5vanqL01aSQ Mub0yuge22CNzqdOySWNMShXQleiMPWI+s0jYOXFfs/ICI2bYOu8KfKRlaf2WxyX9Vfg 5dHqOAstACUdvHmnVNXYAo+pqZ0KZPgIPicr3jm/NnN8Ang45M8pqyEEqNU/bLsKW0t9 9z/YK4NOMwY2XNWDG92SesA/I0lu0AY3fsR06o2UUKP5ZNbbyD8DW6lGeAVX5p8cPQpy e5aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I32r4kYl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id m5si31994446edc.80.2021.11.07.23.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 23:56:39 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I32r4kYl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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; }