* [PATCH] nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails
@ 2015-06-28 9:00 Axel Lin
2015-06-30 18:37 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-06-28 9:00 UTC (permalink / raw)
To: Dan Williams; +Cc: Toshi Kani, Christoph Hellwig, linux-kernel
Return proper error if class_create() fails.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/nvdimm/bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index ca80270..f6f6a91 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -644,8 +644,10 @@ int __init nvdimm_bus_init(void)
nvdimm_major = rc;
nd_class = class_create(THIS_MODULE, "nd");
- if (IS_ERR(nd_class))
+ if (IS_ERR(nd_class)) {
+ rc = PTR_ERR(nd_class);
goto err_class;
+ }
return 0;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails
2015-06-28 9:00 [PATCH] nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails Axel Lin
@ 2015-06-30 18:37 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2015-06-30 18:37 UTC (permalink / raw)
To: Axel Lin
Cc: Toshi Kani, Christoph Hellwig, linux-kernel@vger.kernel.org,
linux-nvdimm@lists.01.org
On Sun, Jun 28, 2015 at 2:00 AM, Axel Lin <axel.lin@ingics.com> wrote:
> Return proper error if class_create() fails.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Thanks, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-30 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 9:00 [PATCH] nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails Axel Lin
2015-06-30 18:37 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox