lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 May 2024 00:10:52 +0530
From: prabhav kumar <pvkumar5749404@...il.com>
To: andersson@...nel.org, konrad.dybcio@...aro.org, 
	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: julia.lawall@...ia.fr, javier.carrasco@...fvision.net, 
	skhan@...uxfoundation.org
Subject: Re: [PATCH next] drivers: soc: qcom: Auto cleanup using __free(device_node)

Are there any comments for me regarding the patch ?
Please let me know

On Sun, Apr 7, 2024 at 12:53 PM Prabhav Kumar Vaish
<pvkumar5749404@...il.com> wrote:
>
> Use automated cleanup to replace of_node_put() in qcom_smem_resolve_mem().
>
> Signed-off-by: Prabhav Kumar Vaish <pvkumar5749404@...il.com>
> ---
> drivers/soc/qcom/smem.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index 7191fa0c087f..ad1cf8dcc6ec 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -1032,18 +1032,16 @@ static int qcom_smem_resolve_mem(struct qcom_smem *smem, const char *name,
>                                  struct smem_region *region)
>  {
>         struct device *dev = smem->dev;
> -       struct device_node *np;
>         struct resource r;
>         int ret;
> +       struct device_node *np __free(device_node) = of_parse_phandle(dev->of_node, name, 0);
>
> -       np = of_parse_phandle(dev->of_node, name, 0);
>         if (!np) {
>                 dev_err(dev, "No %s specified\n", name);
>                 return -EINVAL;
>         }
>
>         ret = of_address_to_resource(np, 0, &r);
> -       of_node_put(np);
>         if (ret)
>                 return ret;
>
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ