public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	Javier Martinez Canillas <javier@osg.samsung.com>
Subject: Re: [RFT 1/2] [media] exynos4-is: Add missing endpoint of_node_put on error paths
Date: Mon, 14 Mar 2016 08:51:02 +0900	[thread overview]
Message-ID: <56E5FCE6.6060508@samsung.com> (raw)
In-Reply-To: <56E2BA7D.9050500@samsung.com>

On 11.03.2016 21:30, Sylwester Nawrocki wrote:
> On 01/26/2016 01:41 AM, Krzysztof Kozlowski wrote:
>> In fimc_md_parse_port_node() endpoint node is get with of_get_next_child()
>> but it is not put on error path.
> 
> "is get" doesn't sound right to me, how about rephrasing this to:
> 
> "In fimc_md_parse_port_node() reference count of the endpoint node
> "is incremented by of_get_next_child() but it is not decremented
>  on error path."
> 
>> Fixes: 56fa1a6a6a7d ("[media] s5p-fimc: Change the driver directory name to exynos4-is")
>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> ---
>> Not tested on hardware, only built+static checkers.
>> ---
>>  drivers/media/platform/exynos4-is/media-dev.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
>> b/drivers/media/platform/exynos4-is/media-dev.c
>> index f3b2dd30ec77..de0977479327 100644
>> --- a/drivers/media/platform/exynos4-is/media-dev.c
>> +++ b/drivers/media/platform/exynos4-is/media-dev.c
>> @@ -339,8 +339,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>>  		return 0;
>>  
>>  	v4l2_of_parse_endpoint(ep, &endpoint);
>> -	if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS)
>> +	if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS) {
>> +		of_node_put(ep);
>>  		return -EINVAL;
>> +	}
> 
> Thanks for the patch, it looks correct but it doesn't apply cleanly
> due to patches already in media master branch [1]. Could you refresh
> this patch and resend?
> Also I don't quite like multiple calls to of_node_put(), how about
> doing something like this instead:

How about sending your patch then with my reported-by?

Best regards,
Krzysztof


      reply	other threads:[~2016-03-13 23:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26  0:41 [RFT 1/2] [media] exynos4-is: Add missing endpoint of_node_put on error paths Krzysztof Kozlowski
2016-01-26  0:41 ` [RFT 2/2] [media] exynos4-is: Add missing port parent " Krzysztof Kozlowski
2016-03-07 14:17   ` Javier Martinez Canillas
2016-03-11 12:37   ` Sylwester Nawrocki
2016-03-07 14:15 ` [RFT 1/2] [media] exynos4-is: Add missing endpoint " Javier Martinez Canillas
2016-03-11 12:30 ` Sylwester Nawrocki
2016-03-13 23:51   ` Krzysztof Kozlowski [this message]

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=56E5FCE6.6060508@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=javier@osg.samsung.com \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=s.nawrocki@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox