mtd: create_freezable_workqueue() doesn't return an ERR_PTR
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Aug 30 16:59:04 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=39de86ef0d333b210d27edad828d4f7cf68feff3
Commit: 39de86ef0d333b210d27edad828d4f7cf68feff3
Parent: 8a9f4aa3ac7560efcb242b3d1a31b1d804106f12
Author: Dan Carpenter <dan.carpenter at oracle.com>
AuthorDate: Thu Aug 15 10:56:29 2013 +0300
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:36:14 2013 +0100
mtd: create_freezable_workqueue() doesn't return an ERR_PTR
The create_freezable_workqueue() returns a NULL on error, it doesn't
return an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/sm_ftl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index f9d5615..3441e73 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -1274,10 +1274,10 @@ static struct mtd_blktrans_ops sm_ftl_ops = {
static __init int sm_module_init(void)
{
int error = 0;
- cache_flush_workqueue = create_freezable_workqueue("smflush");
- if (IS_ERR(cache_flush_workqueue))
- return PTR_ERR(cache_flush_workqueue);
+ cache_flush_workqueue = create_freezable_workqueue("smflush");
+ if (!cache_flush_workqueue)
+ return -ENOMEM;
error = register_mtd_blktrans(&sm_ftl_ops);
if (error)
More information about the linux-mtd-cvs
mailing list