[PATCH] tda9950: Slightly simplify tda9950_devm_glue_init()
Christophe JAILLET
christophe.jaillet at wanadoo.fr
Sun Feb 13 07:52:49 UTC 2022
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 at 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
More information about the dri-devel
mailing list