dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/etnaviv: fail probe if core or bus clock are absent
@ 2016-08-26 15:49 Lucas Stach
  2016-08-26 15:49 ` [PATCH 1/2] net: fec: don't ack masked interrupt events Lucas Stach
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Lucas Stach @ 2016-08-26 15:49 UTC (permalink / raw)
  To: dri-devel; +Cc: Russell King

The devicetree documentation states that those are required properties,
so the driver should refuse to probe if those are absent to be
consistent. This will also allow to drop some error checking from the
clock enable/disable paths.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index b851809d29b3..ec14aaaf6dd7 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1684,12 +1684,12 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
 	gpu->clk_bus = devm_clk_get(&pdev->dev, "bus");
 	DBG("clk_bus: %p", gpu->clk_bus);
 	if (IS_ERR(gpu->clk_bus))
-		gpu->clk_bus = NULL;
+		return PTR_ERR(gpu->clk_bus);
 
 	gpu->clk_core = devm_clk_get(&pdev->dev, "core");
 	DBG("clk_core: %p", gpu->clk_core);
 	if (IS_ERR(gpu->clk_core))
-		gpu->clk_core = NULL;
+		return PTR_ERR(gpu->clk_core);
 
 	gpu->clk_shader = devm_clk_get(&pdev->dev, "shader");
 	DBG("clk_shader: %p", gpu->clk_shader);
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-08-29 10:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 15:49 [PATCH 1/2] drm/etnaviv: fail probe if core or bus clock are absent Lucas Stach
2016-08-26 15:49 ` [PATCH 1/2] net: fec: don't ack masked interrupt events Lucas Stach
2016-08-26 15:53   ` Lucas Stach
2016-08-26 16:18     ` Russell King - ARM Linux
2016-08-26 15:49 ` [PATCH 2/2] drm/etnaviv: fold various clock enable/disable functions into top ones Lucas Stach
2016-08-26 15:49 ` [PATCH 2/2] net: fec: optimize IRQ handler Lucas Stach
2016-08-26 16:10 ` [PATCH 1/2] drm/etnaviv: fail probe if core or bus clock are absent Russell King - ARM Linux
2016-08-29 10:47   ` Lucas Stach
2016-08-29 10:51     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox