From patchwork Sat May 8 22:00:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1475925 X-Patchwork-Delegate: trini@ti.com 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=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZEA+k1MQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 ozlabs.org (Postfix) with ESMTPS id 4Fd1Wp6JGmz9tlZ for ; Sun, 9 May 2021 08:02:30 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 94DBA82EB1; Sun, 9 May 2021 00:01:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZEA+k1MQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C4B3B82E97; Sun, 9 May 2021 00:01:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 5D59582E99 for ; Sun, 9 May 2021 00:00:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id b10so11301814iot.4 for ; Sat, 08 May 2021 15:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sjufG9zCPVwTIx9oaHGnUAj2G//V91Skx+PwJMiakOg=; b=ZEA+k1MQzHU51nCNhY1ftfMIvn/O+cvMKSLuCX5s3U2DpLGqzMmtVoKEo+pCSPUE2V zNS5NuzOvhQI/8XI7W3NfQj63/7+cI5+8HdqDqiJKGP4aywB8LYzgVhynw+B4iyaEBaw /aDC40zyYMPFiIsadsi1NWXqF1HsCYCU8zhTM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sjufG9zCPVwTIx9oaHGnUAj2G//V91Skx+PwJMiakOg=; b=ik4vzipanjr8fuUH/235iUgsZJ91zq9CQ7ctJK7xiZzSdi8NP2i9GY5sCAtuMZCYg4 3ppjBj1+FVacYnHvG6m1hVI4LRAIjzYIbXOYqZpK2ys33poYs25JKJ3y8AOmZQAactaU ubDDZcbOfxMxZf6YtsqaHXzjX/Qw893kRVZI9vWc3V9iLOpxDIofaWf45Ox39gcey1b9 bJHIPR5g4Ypc6HMG9mO1SYuR1hf0j1CQOAy7/mPNGiUFnbp+HcTaX1GZs+exKXhBgIIO XUCwFZtAbK4z7rEuXD4xPXrHBRgq1XRnNjb6SO6zft2IIkvlnf6F7fC6bqrOWoOg12Kn Nd/Q== X-Gm-Message-State: AOAM530q9kHupMN6EbxkAfrePH8LOxOeyVUj2eR/47yCzDWRrhb058Aa M9KfvW9hpk9OsxuqPto3ypgV8QQLwPw3+QV1 X-Google-Smtp-Source: ABdhPJwbyEKI05c36gAjVePzYDVD1Xai+xXKJyLRjpNnJO42fSpZtWkudWmQILghscQWOLLutwqfTA== X-Received: by 2002:a02:380d:: with SMTP id b13mr14545806jaa.77.1620511232935; Sat, 08 May 2021 15:00:32 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id t7sm5195196ile.87.2021.05.08.15.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 15:00:32 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 07/17] reset: Avoid a warning in devm_regmap_init() Date: Sat, 8 May 2021 16:00:11 -0600 Message-Id: <20210508220021.1778080-8-sjg@chromium.org> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog In-Reply-To: <20210508220021.1778080-1-sjg@chromium.org> References: <20210508220021.1778080-1-sjg@chromium.org> MIME-Version: 1.0 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.102.4 at phobos.denx.de X-Virus-Status: Clean The devres_alloc() function is intended to avoid the need for freeing memory, although in practice it may not be enabled, thus leading to a true leak. Nevertheless this is intended. Add a comment to molify Coverity. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312951) Acked-by: Pratyush Yadav --- drivers/core/regmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c index b51ce108c14..15ed189352c 100644 --- a/drivers/core/regmap.c +++ b/drivers/core/regmap.c @@ -293,6 +293,7 @@ struct regmap *devm_regmap_init(struct udevice *dev, int rc; struct regmap **mapp, *map; + /* coverity[RESOURCE_LEAK] */ mapp = devres_alloc(devm_regmap_release, sizeof(struct regmap *), __GFP_ZERO); if (unlikely(!mapp))