diff mbox series

[09/10] drm/ast: Respect return value from CRTC init

Message ID 20240911115347.899148-10-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm/ast: Various cleanups | expand

Commit Message

Thomas Zimmermann Sept. 11, 2024, 11:51 a.m. UTC
Return an error if CRTC initialization fails.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/ast/ast_mode.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jocelyn Falempe Sept. 12, 2024, 1:49 p.m. UTC | #1
On 11/09/2024 13:51, Thomas Zimmermann wrote:
> Return an error if CRTC initialization fails.

Thanks, it looks good to me.

Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>   drivers/gpu/drm/ast/ast_mode.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index 784e8ac0e668..f90fade5d681 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -1396,7 +1396,9 @@ int ast_mode_config_init(struct ast_device *ast)
>   	if (ret)
>   		return ret;
>   
> -	ast_crtc_init(dev);
> +	ret = ast_crtc_init(dev);
> +	if (ret)
> +		return ret;
>   
>   	switch (ast->tx_chip) {
>   	case AST_TX_NONE:
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 784e8ac0e668..f90fade5d681 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -1396,7 +1396,9 @@  int ast_mode_config_init(struct ast_device *ast)
 	if (ret)
 		return ret;
 
-	ast_crtc_init(dev);
+	ret = ast_crtc_init(dev);
+	if (ret)
+		return ret;
 
 	switch (ast->tx_chip) {
 	case AST_TX_NONE: