All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <p.yadav@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH 07/17] reset: Avoid a warning in devm_regmap_init()
Date: Mon, 10 May 2021 12:59:27 +0530	[thread overview]
Message-ID: <20210510072925.iormrzvwzo7hhyox@ti.com> (raw)
In-Reply-To: <20210508220021.1778080-8-sjg@chromium.org>

> Subject: [PATCH 07/17] reset: Avoid a warning in devm_regmap_init()

s/reset/regmap/

On 08/05/21 04:00PM, Simon Glass wrote:
> 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 <sjg@chromium.org>
> Reported-by: Coverity (CID: 312951)

Acked-by: Pratyush Yadav <p.yadav@ti.com>

> ---
> 
>  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))

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.

  reply	other threads:[~2021-05-10  7:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 22:00 [PATCH 00/17] Fix various coverity warnings Simon Glass
2021-05-08 22:00 ` [PATCH 01/17] sandbox: net: Ensure host name is always a valid string Simon Glass
2021-05-09  4:14   ` Ramon Fried
2021-05-08 22:00 ` [PATCH 02/17] video: Check return value in pwm_backlight_of_to_plat() Simon Glass
2021-05-08 22:00 ` [PATCH 03/17] sandbox: Indicate NULL-pointer access in 'sigsegv' command Simon Glass
2021-05-10 13:07   ` Tom Rini
2021-05-08 22:00 ` [PATCH 04/17] test: Rename final check in setexpr_test_backref() Simon Glass
2021-05-08 22:00 ` [PATCH 05/17] tools: Avoid showing return value of clock_gettime() Simon Glass
2021-05-08 22:00 ` [PATCH 06/17] reset: Avoid a warning in devm_reset_bulk_get_by_node() Simon Glass
2021-05-08 22:00 ` [PATCH 07/17] reset: Avoid a warning in devm_regmap_init() Simon Glass
2021-05-10  7:29   ` Pratyush Yadav [this message]
2021-05-08 22:00 ` [PATCH 08/17] test: Avoid random numbers in dm_test_devm_regmap() Simon Glass
2021-05-08 22:00 ` [PATCH 09/17] dm: core: Check uclass_get() return value when dumping Simon Glass
2021-05-08 22:00 ` [PATCH 10/17] sandbox: scmi: Indicate dead code for coverity Simon Glass
2021-05-08 22:00 ` [PATCH 11/17] sandbox: cros_ec: Update error handling when reading matrix Simon Glass
2021-05-08 22:00 ` [PATCH 12/17] cbfs: Check offset range when reading a file Simon Glass
2021-05-08 22:00 ` [PATCH 13/17] pinctrl: Avoid coverity warning when checking width Simon Glass
2021-05-08 22:00 ` [PATCH 14/17] tpm: Check outgoing command size Simon Glass
2021-05-08 22:00 ` [PATCH 15/17] sandbox: Silence coverity warning in state_read_file() Simon Glass
2021-05-08 22:00 ` [PATCH 16/17] clk: Detect failure to set defaults Simon Glass
2021-05-09  0:40   ` Sean Anderson
2021-05-10 16:28     ` Simon Glass
2021-05-10 23:28       ` Sean Anderson
2021-05-08 22:00 ` [PATCH 17/17] RFC: clk: Return error code from clk_set_default_get_by_id() Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210510072925.iormrzvwzo7hhyox@ti.com \
    --to=p.yadav@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.