* [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-23 14:18 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2019-09-23 14:18 UTC (permalink / raw
To: Keith Busch, Christoph Hellwig
Cc: Jens Axboe, Sagi Grimberg, linux-nvme, linux-kernel,
kernel-janitors
"ret" should be a negative error code here, but it's either success or
possibly uninitialized.
Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/nvme/host/core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 63b37d08ac98..f6acbff3e3bc 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2540,8 +2540,9 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
list_add_tail(&subsys->entry, &nvme_subsystems);
}
- if (sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
- dev_name(ctrl->device))) {
+ ret = sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
+ dev_name(ctrl->device));
+ if (ret) {
dev_err(ctrl->device,
"failed to create sysfs link from subsystem.\n");
goto out_put_subsystem;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-23 14:18 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2019-09-23 14:18 UTC (permalink / raw
To: Keith Busch, Christoph Hellwig
Cc: Jens Axboe, kernel-janitors, Sagi Grimberg, linux-nvme,
linux-kernel
"ret" should be a negative error code here, but it's either success or
possibly uninitialized.
Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/nvme/host/core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 63b37d08ac98..f6acbff3e3bc 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2540,8 +2540,9 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
list_add_tail(&subsys->entry, &nvme_subsystems);
}
- if (sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
- dev_name(ctrl->device))) {
+ ret = sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
+ dev_name(ctrl->device));
+ if (ret) {
dev_err(ctrl->device,
"failed to create sysfs link from subsystem.\n");
goto out_put_subsystem;
--
2.20.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-23 14:18 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2019-09-23 14:18 UTC (permalink / raw
To: Keith Busch, Christoph Hellwig
Cc: Jens Axboe, kernel-janitors, Sagi Grimberg, linux-nvme,
linux-kernel
"ret" should be a negative error code here, but it's either success or
possibly uninitialized.
Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/nvme/host/core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 63b37d08ac98..f6acbff3e3bc 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2540,8 +2540,9 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
list_add_tail(&subsys->entry, &nvme_subsystems);
}
- if (sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
- dev_name(ctrl->device))) {
+ ret = sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
+ dev_name(ctrl->device));
+ if (ret) {
dev_err(ctrl->device,
"failed to create sysfs link from subsystem.\n");
goto out_put_subsystem;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] nvme: fix an error code in nvme_init_subsystem()
2019-09-23 14:18 ` Dan Carpenter
(?)
@ 2019-09-23 14:26 ` Keith Busch
-1 siblings, 0 replies; 9+ messages in thread
From: Keith Busch @ 2019-09-23 14:26 UTC (permalink / raw
To: Dan Carpenter
Cc: Christoph Hellwig, Jens Axboe, Sagi Grimberg, linux-nvme,
linux-kernel, kernel-janitors
On Mon, Sep 23, 2019 at 05:18:36PM +0300, Dan Carpenter wrote:
> "ret" should be a negative error code here, but it's either success or
> possibly uninitialized.
>
> Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, patch looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-23 14:26 ` Keith Busch
0 siblings, 0 replies; 9+ messages in thread
From: Keith Busch @ 2019-09-23 14:26 UTC (permalink / raw
To: Dan Carpenter
Cc: Sagi Grimberg, kernel-janitors, linux-kernel, linux-nvme,
Jens Axboe, Christoph Hellwig
On Mon, Sep 23, 2019 at 05:18:36PM +0300, Dan Carpenter wrote:
> "ret" should be a negative error code here, but it's either success or
> possibly uninitialized.
>
> Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, patch looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-23 14:26 ` Keith Busch
0 siblings, 0 replies; 9+ messages in thread
From: Keith Busch @ 2019-09-23 14:26 UTC (permalink / raw
To: Dan Carpenter
Cc: Sagi Grimberg, kernel-janitors, linux-kernel, linux-nvme,
Jens Axboe, Christoph Hellwig
On Mon, Sep 23, 2019 at 05:18:36PM +0300, Dan Carpenter wrote:
> "ret" should be a negative error code here, but it's either success or
> possibly uninitialized.
>
> Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, patch looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nvme: fix an error code in nvme_init_subsystem()
2019-09-23 14:18 ` Dan Carpenter
(?)
@ 2019-09-27 21:17 ` Christoph Hellwig
-1 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2019-09-27 21:17 UTC (permalink / raw
To: Dan Carpenter
Cc: Keith Busch, Christoph Hellwig, Jens Axboe, Sagi Grimberg,
linux-nvme, linux-kernel, kernel-janitors
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-27 21:17 ` Christoph Hellwig
0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2019-09-27 21:17 UTC (permalink / raw
To: Dan Carpenter
Cc: Sagi Grimberg, kernel-janitors, linux-kernel, linux-nvme,
Jens Axboe, Keith Busch, Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nvme: fix an error code in nvme_init_subsystem()
@ 2019-09-27 21:17 ` Christoph Hellwig
0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2019-09-27 21:17 UTC (permalink / raw
To: Dan Carpenter
Cc: Sagi Grimberg, kernel-janitors, linux-kernel, linux-nvme,
Jens Axboe, Keith Busch, Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-09-27 21:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-23 14:18 [PATCH] nvme: fix an error code in nvme_init_subsystem() Dan Carpenter
2019-09-23 14:18 ` Dan Carpenter
2019-09-23 14:18 ` Dan Carpenter
2019-09-23 14:26 ` Keith Busch
2019-09-23 14:26 ` Keith Busch
2019-09-23 14:26 ` Keith Busch
2019-09-27 21:17 ` Christoph Hellwig
2019-09-27 21:17 ` Christoph Hellwig
2019-09-27 21:17 ` Christoph Hellwig
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.