public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Saud Farooqui <farooqui_saud@hotmail.com>
Cc: jernej.skrabec@gmail.com, samuel@sholland.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	wens@csie.org, daniel@ffwll.ch
Subject: Re: [PATCH v1] drm/sun4i: Return from the function in error condition
Date: Wed, 22 Jun 2022 09:57:25 +0200	[thread overview]
Message-ID: <20220622075725.y6ws22ielpc4pmxw@houat> (raw)
In-Reply-To: <PA4P189MB14215D2A66A54FFA3F7DD9348BB39@PA4P189MB1421.EURP189.PROD.OUTLOOK.COM>


[-- Attachment #1.1: Type: text/plain, Size: 1208 bytes --]

Hi,

On Tue, Jun 21, 2022 at 09:44:27PM +0500, Saud Farooqui wrote:
> Added return statement in sun4i_layer_format_mod_supported()
> in case of error.
> 
> Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
> index 6d43080791a0..85fb9e800ddf 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_layer.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
> @@ -117,7 +117,7 @@ static bool sun4i_layer_format_mod_supported(struct drm_plane *plane,
>  	struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
>  
>  	if (IS_ERR_OR_NULL(layer->backend->frontend))
> -		sun4i_backend_format_is_supported(format, modifier);
> +		return sun4i_backend_format_is_supported(format, modifier);

While there's a bug, it definitely isn't what your commit message
describe.

Frontends only available on some SoCs and are thus optional in the
driver.

If the frontend pointer isn't set, it means that it isn't there and thus
we try to figure out the format through the backend that is always
there.

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-22  7:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07  9:51 [PATCH] drm/sun4i: Add return statement in sun4i_layer_format_mod_supported Add a missing return after the IS_ERR_OR_NULL() check in sun4i_layer_format_mod_supported() Saud Farooqui
2022-06-09 14:22 ` Maxime Ripard
2022-06-21 16:44   ` [PATCH v1] drm/sun4i: Return from the function in error condition Saud Farooqui
2022-06-22  7:57     ` Maxime Ripard [this message]
2022-06-22  8:59       ` [PATCH v2] drm/sun4i: Return if frontend is not present Saud Farooqui
2022-06-22 14:42         ` (subset) " Maxime Ripard
2022-06-27 13:54         ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220622075725.y6ws22ielpc4pmxw@houat \
    --to=maxime@cerno.tech \
    --cc=daniel@ffwll.ch \
    --cc=farooqui_saud@hotmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox