From: Ike Panhc <ike.pan@canonical.com>
To: Qiu Wenbo <qiuwenbo@kylinos.com.cn>,
hdegoede@redhat.com, mgross@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86: ideapad-laptop: fix a NULL pointer dereference
Date: Fri, 30 Apr 2021 16:45:02 +0800 [thread overview]
Message-ID: <a95f27a5-bc5a-a195-09e4-db56d024629e@canonical.com> (raw)
In-Reply-To: <20210428050636.8003-1-qiuwenbo@kylinos.com.cn>
On 4/28/21 1:06 PM, Qiu Wenbo wrote:
> The third parameter of dytc_cql_command should not be NULL since it will
> be dereferenced immediately.
>
> Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Fixes: ff36b0d953dc4 ("platform/x86: ideapad-laptop: rework and create new ACPI helpers")
Acked-by: Ike Panhc <ike.pan@canonical.com>
> ---
> drivers/platform/x86/ideapad-laptop.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index 6cb5ad4be231..8f871151f0cc 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -809,6 +809,7 @@ static int dytc_profile_set(struct platform_profile_handler *pprof,
> {
> struct ideapad_dytc_priv *dytc = container_of(pprof, struct ideapad_dytc_priv, pprof);
> struct ideapad_private *priv = dytc->priv;
> + unsigned long output;
> int err;
>
> err = mutex_lock_interruptible(&dytc->mutex);
> @@ -829,7 +830,7 @@ static int dytc_profile_set(struct platform_profile_handler *pprof,
>
> /* Determine if we are in CQL mode. This alters the commands we do */
> err = dytc_cql_command(priv, DYTC_SET_COMMAND(DYTC_FUNCTION_MMC, perfmode, 1),
> - NULL);
> + &output);
> if (err)
> goto unlock;
> }
>
next parent reply other threads:[~2021-04-30 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210428050636.8003-1-qiuwenbo@kylinos.com.cn>
2021-04-30 8:45 ` Ike Panhc [this message]
2021-05-11 11:39 ` Hans de Goede
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=a95f27a5-bc5a-a195-09e4-db56d024629e@canonical.com \
--to=ike.pan@canonical.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qiuwenbo@kylinos.com.cn \
/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®