All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Henzl <thenzl@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] sd: fix an error return in probe()
Date: Thu, 16 Apr 2015 12:23:28 +0000	[thread overview]
Message-ID: <552FA9C0.7020109@redhat.com> (raw)
In-Reply-To: <20150119144112.GB19086@mwanda>

On 01/19/2015 03:41 PM, Dan Carpenter wrote:
> If device_add() fails then it should return the error code but instead
> the current code returns success.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index ebf35cb6..75a0b55 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -3019,7 +3019,8 @@ static int sd_probe(struct device *dev)
>  	sdkp->dev.class = &sd_disk_class;
>  	dev_set_name(&sdkp->dev, "%s", dev_name(dev));
>  
> -	if (device_add(&sdkp->dev))
> +	error = device_add(&sdkp->dev);
> +	if (error)
>  		goto out_free_index;
>  
>  	get_device(dev);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Tomas


WARNING: multiple messages have this Message-ID (diff)
From: Tomas Henzl <thenzl@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] sd: fix an error return in probe()
Date: Thu, 16 Apr 2015 14:23:28 +0200	[thread overview]
Message-ID: <552FA9C0.7020109@redhat.com> (raw)
In-Reply-To: <20150119144112.GB19086@mwanda>

On 01/19/2015 03:41 PM, Dan Carpenter wrote:
> If device_add() fails then it should return the error code but instead
> the current code returns success.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index ebf35cb6..75a0b55 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -3019,7 +3019,8 @@ static int sd_probe(struct device *dev)
>  	sdkp->dev.class = &sd_disk_class;
>  	dev_set_name(&sdkp->dev, "%s", dev_name(dev));
>  
> -	if (device_add(&sdkp->dev))
> +	error = device_add(&sdkp->dev);
> +	if (error)
>  		goto out_free_index;
>  
>  	get_device(dev);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Tomas


  parent reply	other threads:[~2015-04-16 12:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 14:41 [patch] sd: fix an error return in probe() Dan Carpenter
2015-01-19 14:41 ` Dan Carpenter
2015-04-14 14:28 ` Dan Carpenter
2015-04-14 14:28   ` Dan Carpenter
2015-04-16 12:23 ` Tomas Henzl [this message]
2015-04-16 12:23   ` Tomas Henzl

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=552FA9C0.7020109@redhat.com \
    --to=thenzl@redhat.com \
    --cc=JBottomley@parallels.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@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 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.