All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jackie Liu <liu.yun@linux.dev>
Cc: Guenter Roeck <linux@roeck-us.net>,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	hch@lst.de, axboe@kernel.dk
Subject: Re: [PATCH v2] scsi: bsg: fix errno when scsi_bsg_register_queue fails
Date: Thu, 23 Dec 2021 07:33:29 +0100	[thread overview]
Message-ID: <20211223063329.GA3882@lst.de> (raw)
In-Reply-To: <6e8e5593-eeed-dcb6-2b4d-008b82c8d14c@linux.dev>

On Thu, Dec 23, 2021 at 10:42:30AM +0800, Jackie Liu wrote:
> I see, Thanks for point out, after commit ee37e09d81a4 ("[SCSI] fix
> duplicate removal on error path in scsi_sysfs_add_sdev"), Before this
> errno will be forced to return 0.
>
> After:
>
> [1] error = device_create_file(&sdev->sdev_gendev,  	
>                            sdev->host->hostt->sdev_attrs[i]);
>
> Then:
>
> with 92c4b58b15c5 ("scsi: core: Register sysfs attributes earlier")
> delete code [1], so we force return errno.
>
> I don’t know if I should restore the original logic or delete
> this comment information. Guenter and Christoph, What do you think? I
> can send another patch based on this.

I think we should just handle the error properly and remove the comment.
There's no good reason to ignore bsg registration errors.

      parent reply	other threads:[~2021-12-23  6:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  1:02 [PATCH v2] scsi: bsg: fix errno when scsi_bsg_register_queue fails Jackie Liu
2021-12-22 16:54 ` Guenter Roeck
2021-12-23  1:07   ` Jackie Liu
2021-12-23  1:35     ` Guenter Roeck
2021-12-23  2:42       ` Jackie Liu
2021-12-23  3:13         ` Jackie Liu
2021-12-23  6:33         ` Christoph Hellwig [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=20211223063329.GA3882@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=liu.yun@linux.dev \
    --cc=martin.petersen@oracle.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.