Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435723 > unrolled thread

Re: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle

Started byChanwoo Choi <cwchoi00@gmail.com>
First post2016-07-02 06:50 +0200
Last post2016-07-02 06:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle Chanwoo Choi <cwchoi00@gmail.com> - 2016-07-02 06:50 +0200

#1435723 — Re: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle

FromChanwoo Choi <cwchoi00@gmail.com>
Date2016-07-02 06:50 +0200
SubjectRe: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
Message-ID<rQl2p-7uT-1@gated-at.bofh.it>
Hi Peter,

Applied it.

Regards,
Chanwoo Choi

2016-07-01 18:41 GMT+09:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/extcon/extcon.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 21a123c..86ea14d 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
>         list_for_each_entry(edev, &extcon_dev_list, entry) {
>                 if (edev->dev.parent && edev->dev.parent->of_node == node) {
>                         mutex_unlock(&extcon_dev_list_lock);
> +                       of_node_put(node);
>                         return edev;
>                 }
>         }
>         mutex_unlock(&extcon_dev_list_lock);
> +       of_node_put(node);
>
>         return ERR_PTR(-EPROBE_DEFER);
>  }
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web