Re: [dm-devel] [PATCH 05/10] nvme: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
On Tue, Aug 24, 2021 at 07:09:37AM +0100, Christoph Hellwig wrote: > On Mon, Aug 23, 2021 at 01:29:25PM -0700, Luis Chamberlain wrote: > > + rc = device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups); > > + if (rc) > > + goto out_cleanup_ns_from_list; > > + > > Nit: no real

Re: [dm-devel] [PATCH 05/10] nvme: add error handling support for add_disk()

2021-08-23 Thread Christoph Hellwig
On Mon, Aug 23, 2021 at 01:29:25PM -0700, Luis Chamberlain wrote: > + rc = device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups); > + if (rc) > + goto out_cleanup_ns_from_list; > + Nit: no real need for the rc variable here as we never use the actual value. > i

[dm-devel] [PATCH 05/10] nvme: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/nvme/host/core.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c