public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: ks7010: return on failure
Date: Thu, 1 Sep 2016 17:53:19 +0200	[thread overview]
Message-ID: <20160901155319.GA7842@kroah.com> (raw)
In-Reply-To: <1471977456-7784-1-git-send-email-sudipm.mukherjee@gmail.com>

On Wed, Aug 24, 2016 at 12:07:35AM +0530, Sudip Mukherjee wrote:
> On failure we were jumping to error_out0 where we were trying
> sdio_release_host() but at this point of execution we still have not
> done sdio_claim_host() and as a result host->claimed can still be 0.
> And if host->claimed is 0 then WARN_ON(!host->claimed) will give
> a warning.
> Moreover, if it is still not claimed then mmc_host->claim_cnt will be 0
> and mmc_release_host() will do "if (--host->claim_cnt)" and thus the
> condition will become true.
> Lets just return the value on allocation failure instead of trying to
> release the host before claiming it.
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
>  drivers/staging/ks7010/ks7010_sdio.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Please always cc: the maintainer of the driver when you send patches in.

Please fix that up and resend these 2 patches.

thanks,

greg k-h

      parent reply	other threads:[~2016-09-01 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 18:37 [PATCH 1/2] staging: ks7010: return on failure Sudip Mukherjee
2016-08-23 18:37 ` [PATCH 2/2] staging: ks7010: fix memory leak Sudip Mukherjee
2016-09-01 15:53 ` Greg Kroah-Hartman [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=20160901155319.GA7842@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@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