public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [patch] mtd: create_freezable_workqueue() doesn't return an ERR_PTR
@ 2013-08-15  7:56 Dan Carpenter
  2013-08-16 14:40 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-08-15  7:56 UTC (permalink / raw)
  To: David Woodhouse; +Cc: kernel-janitors, linux-mtd

The create_freezable_workqueue() returns a NULL on error, it doesn't
return an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] mtd: create_freezable_workqueue() doesn't return an ERR_PTR
  2013-08-15  7:56 [patch] mtd: create_freezable_workqueue() doesn't return an ERR_PTR Dan Carpenter
@ 2013-08-16 14:40 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2013-08-16 14:40 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: kernel-janitors, David Woodhouse, linux-mtd

On Thu, 2013-08-15 at 10:56 +0300, Dan Carpenter wrote:
> The create_freezable_workqueue() returns a NULL on error, it doesn't
> return an ERR_PTR.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-16 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15  7:56 [patch] mtd: create_freezable_workqueue() doesn't return an ERR_PTR Dan Carpenter
2013-08-16 14:40 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox