From: Rui Miguel Silva <rmfrfs@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: greybus: light: Release memory obtained by kasprintf
Date: Mon, 25 Sep 2017 15:19:21 +0100 [thread overview]
Message-ID: <20170925141921.GA21407@arch-late.localdomain> (raw)
In-Reply-To: <baf2a8a669db22f479b72754539183050efdbef5.1506152318.git.arvind.yadav.cs@gmail.com>
Hi,
On Sat, Sep 23, 2017 at 01:25:30PM +0530, Arvind Yadav wrote:
> Free memory region, if gb_lights_channel_config is not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Thanks for the patch, looks good to me.
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
---
Cheers,
Rui
> ---
> changes in v2:
> - Subject line changed.
> - add kfree in __gb_lights_led_unregister().
> - No need to check return value of gb_lights_channel_flash_config().
>
> changes ib v3:
> - separate patch for "No need to check return value of
> gb_lights_channel_flash_config()".
>
> drivers/staging/greybus/light.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
> index 3f4148c..0f538b8 100644
> --- a/drivers/staging/greybus/light.c
> +++ b/drivers/staging/greybus/light.c
> @@ -925,6 +925,8 @@ static void __gb_lights_led_unregister(struct gb_channel *channel)
> return;
>
> led_classdev_unregister(cdev);
> + kfree(cdev->name);
> + cdev->name = NULL;
> channel->led = NULL;
> }
>
> --
> 2.7.4
>
prev parent reply other threads:[~2017-09-25 14:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-23 7:55 Arvind Yadav
2017-09-25 14:19 ` Rui Miguel Silva [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=20170925141921.GA21407@arch-late.localdomain \
--to=rmfrfs@gmail.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@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 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®