From: "Михаил Лобанов" <m.lobanov@rosalinux.ru>
To: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
greybus-dev@lists.linaro.org
Subject: Re: [PATCH] greybus: Fix deref of NULL in __gb_lights_flash_brightness_set
Date: Wed, 6 Mar 2024 18:29:18 +0300 (MSK) [thread overview]
Message-ID: <263695481.5978842.1709738958259.JavaMail.zimbra@rosalinux.ru> (raw)
In-Reply-To: <m38r2v67h8.fsf@gmail.com>
Hi Rui, if you can, please prepare a patch with my reported-by tag.
Thanks!
Yours sincerely, Mikhail!
>Hi Mikhail,
>Mikhail Lobanov <m.lobanov@rosalinux.ru> writes:
>
>
>Are you sending a new version with the changes suggested in this thread?
>or do you want me to prepare something with your reported-by tag?
>
>Cheers,
> Rui
> ---
> drivers/staging/greybus/light.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
> index 87d36948c610..929514350947 100644
> --- a/drivers/staging/greybus/light.c
> +++ b/drivers/staging/greybus/light.c
> @@ -148,10 +148,15 @@ static int __gb_lights_flash_brightness_set(struct gb_channel *channel)
> GB_CHANNEL_MODE_TORCH);
>
> /* For not flash we need to convert brightness to intensity */
> - intensity = channel->intensity_uA.min +
> +
> + if (channel) {
> + intensity = channel->intensity_uA.min +
> (channel->intensity_uA.step * channel->led->brightness);
>
> - return __gb_lights_flash_intensity_set(channel, intensity);
> + return __gb_lights_flash_intensity_set(channel, intensity);
> + }
> +
> + return 0;
> }
> #else
> static struct gb_channel *get_channel_from_cdev(struct led_classdev *cdev)
> --
> 2.43.0
prev parent reply other threads:[~2024-03-06 15:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 19:04 [PATCH] greybus: Fix deref of NULL in __gb_lights_flash_brightness_set Mikhail Lobanov
2024-03-02 9:59 ` Dan Carpenter
2024-03-02 14:57 ` [greybus-dev] " Alex Elder
2024-03-02 15:21 ` Rui Miguel Silva
2024-03-02 15:23 ` Rui Miguel Silva
2024-03-04 6:29 ` Dan Carpenter
2024-03-02 15:18 ` Rui Miguel Silva
2024-03-02 15:31 ` [greybus-dev] " Alex Elder
2024-03-02 16:35 ` Rui Miguel Silva
2024-03-04 13:30 ` Alex Elder
2024-03-04 13:30 ` Alex Elder
2024-03-06 9:21 ` Rui Miguel Silva
2024-03-06 15:29 ` Михаил Лобанов [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=263695481.5978842.1709738958259.JavaMail.zimbra@rosalinux.ru \
--to=m.lobanov@rosalinux.ru \
--cc=greybus-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=rmfrfs@gmail.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).