mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Sagar Dharia <sdharia@codeaurora.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/2] slimbus: qcom-ctrl: fix a NULL test
Date: Tue, 9 Jan 2018 09:48:23 +0000	[thread overview]
Message-ID: <0e365f53-bb45-2d95-30fb-9a862319df35@linaro.org> (raw)
In-Reply-To: <20180109092616.mfha2rs56oaxfjaz@mwanda>



On 09/01/18 09:26, Dan Carpenter wrote:
> "retries" ends when it is set to -1 and not 0 so that part of the test
> is wrong.  This bug would lead to a NULL dereference a couple lines
> later.
> 
> Fixes: afbdcc7c384b ("slimbus: Add messaging APIs to slimbus framework")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Should Greg be added to the MAINTAINERS file for this driver?
> 
> diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
> index fb1a5e0eb8dd..3ab59209cbdc 100644
> --- a/drivers/slimbus/qcom-ctrl.c
> +++ b/drivers/slimbus/qcom-ctrl.c
> @@ -345,7 +345,7 @@ static int qcom_xfer_msg(struct slim_controller *sctrl,
>   		}
>   	}
>   
> -	if (!retries && !pbuf)
> +	if (!pbuf)
>   		return -ENOMEM;
>   
>   	puc = (u8 *)pbuf;
> 

Already fixed at:
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1575799.html

      parent reply	other threads:[~2018-01-09  9:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09  9:26 Dan Carpenter
2018-01-09  9:26 ` [PATCH 2/2] slimbus: qcom-ctrl: Fix devm_ioremap_resource() error handling Dan Carpenter
2018-01-09  9:48   ` Srinivas Kandagatla
2018-01-09  9:48 ` Srinivas Kandagatla [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=0e365f53-bb45-2d95-30fb-9a862319df35@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdharia@codeaurora.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®