gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
Subsystems (3)
PATCH 1/1 gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
From: Wolfram Sang <[email protected]>
This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable.
---
Compile tested only. I am on the road and can't test the multimedia drivers because of no cables :( If someone could test it, that would be much appreciated. Or I'll do it next week. The pattern worked for other drivers I could actually test, though.
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rcar-du/rcar_du_drv.c +1 -1
@@ -318,7 +318,7 @@ static int rcar_du_probe(struct platform_device *pdev)init_waitqueue_head (&rcdu->commit.wait); rcdu->dev = &pdev->dev; - rcdu->info =of_match_device (rcar_du_of_table, rcdu->dev)->data; + rcdu->info =of_device_get_match_data (rcdu->dev); ddev =drm_dev_alloc (&rcar_du_driver, &pdev->dev);if (!ddev)
Signature · 1 line
2.7.0
Quoted 7 lines · Wolfram Sang
From: Wolfram Sang <[email protected]>
This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable.
Signed-off-by Wolfram Sang <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Wolfram,
Thank you for the patch. It looks like I've missed it, sorry about that.
Quoted 7 lines · On Tuesday 01 March 2016 17:37:34 Wolfram Sang wrote:
From: Wolfram Sang <[email protected]>
This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable.
Signed-off-by Wolfram Sang <[email protected]>
and taken in my tree.
Quoted 24 lines
---
Compile tested only. I am on the road and can't test the multimedia drivers because of no cables :( If someone could test it, that would be much appreciated. Or I'll do it next week. The pattern worked for other drivers I could actually test, though.
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/rcar-du/rcar_du_drv.cindexed6006bf6bd893..ac95509e80bb7c100644drivers/gpu/drm/rcar-du/rcar_du_drv.c +1
-1@@ -318,7 +318,7 @@ static int rcar_du_probe(struct platform_device *pdev)init_waitqueue_head (&rcdu->commit.wait); rcdu->dev = &pdev->dev; - rcdu->info =of_match_device (rcar_du_of_table, rcdu->dev)->data; + rcdu->info =of_device_get_match_data (rcdu->dev); ddev =drm_dev_alloc (&rcar_du_driver, &pdev->dev);if (!ddev)
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel