* [PATCH] tda9950: Slightly simplify tda9950_devm_glue_init()
@ 2022-02-13 7:52 Christophe JAILLET
0 siblings, 0 replies; only message in thread
From: Christophe JAILLET @ 2022-02-13 7:52 UTC (permalink / raw)
To: David Airlie, Daniel Vetter
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, dri-devel
Use devm_add_action_or_reset() instead of hand writing it.
This is more straightforward and saves a few lines of code.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/i2c/tda9950.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c
index 5b03fdd1eaa4..526774594510 100644
--- a/drivers/gpu/drm/i2c/tda9950.c
+++ b/drivers/gpu/drm/i2c/tda9950.c
@@ -361,9 +361,7 @@ static int tda9950_devm_glue_init(struct device *dev, struct tda9950_glue *glue)
return ret;
}
- ret = devm_add_action(dev, tda9950_devm_glue_exit, glue);
- if (ret)
- tda9950_devm_glue_exit(glue);
+ ret = devm_add_action_or_reset(dev, tda9950_devm_glue_exit, glue);
return ret;
}
--
2.32.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-13 7:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 7:52 [PATCH] tda9950: Slightly simplify tda9950_devm_glue_init() Christophe JAILLET
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).