lkml.org 
[lkml]   [2015]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 5/5] lightnvm: return error if manager not found
Date
We were returning a success value even if a manager was not found.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

Not sure if it was intentionally done like that way. This patch is
placed at the end so it will be easy to drop if i am wrong.
Did this change seeing similar code in nvm_create_target().

drivers/lightnvm/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 9dd1623..c34d0cd 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -264,7 +264,8 @@ static int nvm_init(struct nvm_dev *dev)

if (!ret) {
pr_info("nvm: no compatible manager found.\n");
- return 0;
+ ret = -ENODEV;
+ goto err;
}

pr_info("nvm: registered %s [%u/%u/%u/%u/%u/%u]\n",
--
1.9.1


\
 
 \ /
  Last update: 2015-11-24 12:01    [W:0.181 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site