All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Arkver <ian.arkver.dev@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, niklas.soderlund@ragnatech.se,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 1/9] davinci-vpif: Fix endpoint refcounting
Date: Fri, 5 Apr 2019 12:30:07 +0100	[thread overview]
Message-ID: <d38e015e-0177-194b-4275-fcd7ac22ef23@gmail.com> (raw)
In-Reply-To: <20190405094127.18975-3-sakari.ailus@linux.intel.com>

Hi Sakari,

My mail client at least is showing two versions of patch [1/9] with 
different commit messages but (I think) the same content.

Regards,
Ian

On 05/04/2019 10:41, Sakari Ailus wrote:
> This patch addresses two problems with endpoint refcounting in parsing
> davinci-vpif endpoints:
> 
> - put endpoints on error and
> 
> - do not dereference endpoints after they have been put.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>   drivers/media/platform/davinci/vpif_capture.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index b5aacb0fb96b..72bdb3c10962 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1555,7 +1555,6 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>   		if (!rem) {
>   			dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
>   				endpoint);
> -			of_node_put(endpoint);
>   			goto done;
>   		}
>   
> @@ -1567,7 +1566,6 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>   					    GFP_KERNEL);
>   		if (!chan->inputs) {
>   			of_node_put(rem);
> -			of_node_put(endpoint);
>   			goto err_cleanup;
>   		}
>   
> @@ -1578,7 +1576,6 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>   
>   		err = v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint),
>   						 &bus_cfg);
> -		of_node_put(endpoint);
>   		if (err) {
>   			dev_err(&pdev->dev, "Could not parse the endpoint\n");
>   			of_node_put(rem);
> @@ -1609,6 +1606,7 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>   	}
>   
>   done:
> +	of_node_put(endpoint);
>   	pdata->asd_sizes[0] = i;
>   	pdata->subdev_count = i;
>   	pdata->card_name = "DA850/OMAP-L138 Video Capture";
> @@ -1616,6 +1614,7 @@ vpif_capture_get_pdata(struct platform_device *pdev)
>   	return pdata;
>   
>   err_cleanup:
> +	of_node_put(endpoint);
>   	v4l2_async_notifier_cleanup(&vpif_obj.notifier);
>   
>   	return NULL;
> 

  reply	other threads:[~2019-04-05 11:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  9:41 [PATCH 0/9] Rework V4L2 fwnode parsing; add defaults and avoid iteration Sakari Ailus
2019-04-05  9:41 ` [PATCH 1/9] davinci-vpif: Don't dereference endpoint after putting it, fix refcounting Sakari Ailus
2019-04-05  9:41 ` [PATCH 1/9] davinci-vpif: Fix endpoint refcounting Sakari Ailus
2019-04-05 11:30   ` Ian Arkver [this message]
2019-04-05 11:34     ` Sakari Ailus
2019-04-05  9:41 ` [PATCH 2/9] v4l2-async: Use endpoint node, not device node, for fwnode match Sakari Ailus
2019-06-13  0:52   ` Niklas Söderlund
2019-04-05  9:41 ` [PATCH 3/9] v4l2-async: Get fwnode reference when putting it to the notifier's list Sakari Ailus
2019-04-05  9:41 ` [PATCH 4/9] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev Sakari Ailus
2019-04-05  9:41 ` [PATCH 5/9] omap3isp: Rework OF endpoint parsing Sakari Ailus
2019-04-05  9:41 ` [PATCH 6/9] v4l2-async: Safely clean up an uninitialised notifier Sakari Ailus
2019-04-05  9:41 ` [PATCH 7/9] ipu3-cio2: Clean up notifier's subdev list if parsing endpoints fails Sakari Ailus
2019-04-05  9:41 ` [PATCH 8/9] ipu3-cio2: Proceed with notifier init even if there are no subdevs Sakari Ailus
2019-04-05  9:41 ` [PATCH 9/9] ipu3-cio2: Parse information from firmware without using callbacks Sakari Ailus
2019-04-05 11:16 ` [PATCH 0/9] Rework V4L2 fwnode parsing; add defaults and avoid iteration Sakari Ailus
2019-04-12 15:33 ` Jacopo Mondi
2019-04-12 20:27   ` Sakari Ailus

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=d38e015e-0177-194b-4275-fcd7ac22ef23@gmail.com \
    --to=ian.arkver.dev@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=sakari.ailus@linux.intel.com \
    /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.