mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Joshua Grisham <josh@joshuagrisham.com>
Cc: W_Armin@gmx.de, thomas@t-8ch.de, kuurtb@gmail.com,
	 Hans de Goede <hdegoede@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: samsung-galaxybook: Fix block_recording not supported logic
Date: Mon, 3 Mar 2025 12:53:49 +0200 (EET)	[thread overview]
Message-ID: <fd539f15-8b47-3708-6905-8c6aca38c213@linux.intel.com> (raw)
In-Reply-To: <20250302205350.32509-1-josh@joshuagrisham.com>

On Sun, 2 Mar 2025, Joshua Grisham wrote:

> Fixes logic error when block_recording is not supported but the fw attr is
> being added anyway (reported by GitHub user bbregeault).
> 
> Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>

Please add a Fixes tag.

-- 
 i.

> ---
>  drivers/platform/x86/samsung-galaxybook.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/samsung-galaxybook.c b/drivers/platform/x86/samsung-galaxybook.c
> index de1ed2dc6..5878a3519 100644
> --- a/drivers/platform/x86/samsung-galaxybook.c
> +++ b/drivers/platform/x86/samsung-galaxybook.c
> @@ -1100,11 +1100,13 @@ static int galaxybook_fw_attrs_init(struct samsung_galaxybook *galaxybook)
>  	}
>  
>  	err = galaxybook_block_recording_init(galaxybook);
> -	if (!err)
> -		galaxybook->has_block_recording = true;
> -	else if (err != GB_NOT_SUPPORTED)
> +	if (err == GB_NOT_SUPPORTED)
> +		return 0;
> +	else if (err)
>  		return err;
>  
> +	galaxybook->has_block_recording = true;
> +
>  	return galaxybook_fw_attr_init(galaxybook,
>  				       GB_ATTR_BLOCK_RECORDING,
>  				       &block_recording_acpi_get,
> 

      reply	other threads:[~2025-03-03 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-02 20:53 Joshua Grisham
2025-03-03 10:53 ` Ilpo Järvinen [this message]

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=fd539f15-8b47-3708-6905-8c6aca38c213@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=W_Armin@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=josh@joshuagrisham.com \
    --cc=kuurtb@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=thomas@t-8ch.de \
    /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

all inboxes | Powered by JetHome®