linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: stm32-dcmi: Delete an unnecessary of_node_put() call in dcmi_probe()
@ 2019-08-27 14:09 Markus Elfring
  2019-09-02  9:41 ` Hugues FRUCHET
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2019-08-27 14:09 UTC (permalink / raw)
  To: linux-media, linux-stm32, linux-arm-kernel, Alexandre Torgue,
	Hugues Fruchet, Mauro Carvalho Chehab, Maxime Coquelin
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 27 Aug 2019 16:00:13 +0200

A null pointer would be passed to a call of the function “of_node_put”
immediately after a call of the function “of_graph_get_next_endpoint”
failed at one place.
Remove this superfluous function call.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/media/platform/stm32/stm32-dcmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index cb1daf8217ff..9392e3409fba 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -1861,7 +1861,6 @@ static int dcmi_probe(struct platform_device *pdev)
 	np = of_graph_get_next_endpoint(np, NULL);
 	if (!np) {
 		dev_err(&pdev->dev, "Could not find the endpoint\n");
-		of_node_put(np);
 		return -ENODEV;
 	}

--
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: stm32-dcmi: Delete an unnecessary of_node_put() call in dcmi_probe()
  2019-08-27 14:09 [PATCH] media: stm32-dcmi: Delete an unnecessary of_node_put() call in dcmi_probe() Markus Elfring
@ 2019-09-02  9:41 ` Hugues FRUCHET
  0 siblings, 0 replies; 2+ messages in thread
From: Hugues FRUCHET @ 2019-09-02  9:41 UTC (permalink / raw)
  To: Markus Elfring, linux-media, linux-stm32, linux-arm-kernel,
	Alexandre TORGUE, Mauro Carvalho Chehab, Maxime Coquelin
  Cc: LKML, kernel-janitors

Acked-by: Hugues Fruchet <hugues.fruchet@st.com>

On 8/27/19 4:09 PM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 27 Aug 2019 16:00:13 +0200
> 
> A null pointer would be passed to a call of the function “of_node_put”
> immediately after a call of the function “of_graph_get_next_endpoint”
> failed at one place.
> Remove this superfluous function call.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>   drivers/media/platform/stm32/stm32-dcmi.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
> index cb1daf8217ff..9392e3409fba 100644
> --- a/drivers/media/platform/stm32/stm32-dcmi.c
> +++ b/drivers/media/platform/stm32/stm32-dcmi.c
> @@ -1861,7 +1861,6 @@ static int dcmi_probe(struct platform_device *pdev)
>   	np = of_graph_get_next_endpoint(np, NULL);
>   	if (!np) {
>   		dev_err(&pdev->dev, "Could not find the endpoint\n");
> -		of_node_put(np);
>   		return -ENODEV;
>   	}
> 
> --
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-02  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27 14:09 [PATCH] media: stm32-dcmi: Delete an unnecessary of_node_put() call in dcmi_probe() Markus Elfring
2019-09-02  9:41 ` Hugues FRUCHET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).