All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Aishwarya Pant <aishpant@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v6 6/7] staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()
Date: Sun, 12 Mar 2017 15:11:32 +0100	[thread overview]
Message-ID: <20170312141132.GA29303@kroah.com> (raw)
In-Reply-To: <97c79973a44f4695f3d0161b4300fd185363f7f1.1489160830.git.aishpant@gmail.com>

On Fri, Mar 10, 2017 at 09:31:05PM +0530, Aishwarya Pant wrote:
> In bcm2835_audio_open_connection(), if VCHI connection fails or
> initialisation of VCHI audio instance fails vchi_instance needs to be
> deallocated otherwise it will cause a memory leak.
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> 
> ---
> Changes in v6:
> 	- Remove redundant debug logs
> ---
>  .../staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c  | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> index 449799f..fa06bfd 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> @@ -396,8 +396,6 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream
>  		(struct bcm2835_audio_instance *)alsa_stream->instance;
>  	int ret;
>  
> -	LOG_DBG(" .. IN\n");
> -

It's nice to remove these, but don't do so in the same patch you are
doing something else in!

Remember, only one logical thing per patch please.

thanks,

greg k-h


  parent reply	other threads:[~2017-03-12 14:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 15:57 [PATCH v6 0/7] staging: bcm2835-audio: clean-up coding style issues Aishwarya Pant
2017-03-10 15:58 ` [PATCH v6 1/7] staging: bcm2835-audio: Replace kmalloc with kzalloc Aishwarya Pant
2017-03-10 15:59 ` [PATCH v6 2/7] staging: bcm2835-audio: replace null with error pointer value Aishwarya Pant
2017-03-10 15:59 ` [PATCH v6 3/7] staging: bcm2835-audio: propagate PTR_ERR value instead of -EPERM Aishwarya Pant
2017-03-10 16:00 ` [PATCH v6 4/7] staging: bcm2835-audio: use conditional only for error case Aishwarya Pant
2017-03-10 16:00 ` [PATCH v6 5/7] staging: bcm2835-audio: deallocate work when queue_work(...) fails Aishwarya Pant
2017-03-10 16:01 ` [PATCH v6 6/7] staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection() Aishwarya Pant
2017-03-10 21:30   ` [Outreachy kernel] " Julia Lawall
2017-03-12 14:11   ` Greg KH [this message]
2017-03-10 16:02 ` [PATCH v6 7/7] staging: bcm2835-audio: remove BUG_ON() " Aishwarya Pant
2017-03-10 21:09   ` [Outreachy kernel] " Julia Lawall
2017-03-10 21:17   ` Julia Lawall

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=20170312141132.GA29303@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aishpant@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 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.