From: Lee Jones <lee.jones@linaro.org>
To: Wenjia Zhao <driverfuzzing@gmail.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] backlight: pcf50633: pdata may be a null pointer, null pointer dereference cause crash
Date: Tue, 2 Feb 2021 08:28:32 +0000 [thread overview]
Message-ID: <20210202082832.GA4774@dell> (raw)
In-Reply-To: <1612190499-73818-1-git-send-email-driverfuzzing@gmail.com>
On Mon, 01 Feb 2021, Wenjia Zhao wrote:
Please provide a suitable commit messages.
Describe the problem.
Describe the issue was found.
Describe the solution.
> Signed-off-by: Wenjia Zhao <driverfuzzing@gmail.com>
> ---
> drivers/video/backlight/pcf50633-backlight.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c
> index 540dd338..43267af 100644
> --- a/drivers/video/backlight/pcf50633-backlight.c
> +++ b/drivers/video/backlight/pcf50633-backlight.c
> @@ -127,7 +127,8 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, pcf_bl);
>
> - pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
> + if (pdata)
> + pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
A tab should be 8 chars in Linux.
> /*
> * Should be different from bl_props.brightness, so we do not exit
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Wenjia Zhao <driverfuzzing@gmail.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Jingoo Han <jingoohan1@gmail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] backlight: pcf50633: pdata may be a null pointer, null pointer dereference cause crash
Date: Tue, 2 Feb 2021 08:28:32 +0000 [thread overview]
Message-ID: <20210202082832.GA4774@dell> (raw)
In-Reply-To: <1612190499-73818-1-git-send-email-driverfuzzing@gmail.com>
On Mon, 01 Feb 2021, Wenjia Zhao wrote:
Please provide a suitable commit messages.
Describe the problem.
Describe the issue was found.
Describe the solution.
> Signed-off-by: Wenjia Zhao <driverfuzzing@gmail.com>
> ---
> drivers/video/backlight/pcf50633-backlight.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c
> index 540dd338..43267af 100644
> --- a/drivers/video/backlight/pcf50633-backlight.c
> +++ b/drivers/video/backlight/pcf50633-backlight.c
> @@ -127,7 +127,8 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, pcf_bl);
>
> - pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
> + if (pdata)
> + pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
A tab should be 8 chars in Linux.
> /*
> * Should be different from bl_props.brightness, so we do not exit
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-02-02 8:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 14:41 [PATCH] backlight: pcf50633: pdata may be a null pointer, null pointer dereference cause crash Wenjia Zhao
2021-02-01 14:41 ` Wenjia Zhao
2021-02-02 8:28 ` Lee Jones [this message]
2021-02-02 8:28 ` Lee Jones
2021-02-02 9:25 ` Daniel Thompson
2021-02-02 9:25 ` Daniel Thompson
2021-02-02 21:25 ` FUZZ DR
2021-02-03 11:42 ` Daniel Thompson
2021-02-03 11:42 ` Daniel Thompson
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=20210202082832.GA4774@dell \
--to=lee.jones@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=driverfuzzing@gmail.com \
--cc=jingoohan1@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.