diff mbox

md/dm-log: use PTR_ERR value instead of -ENOMEM

Message ID 20100516063119.GC18464@bicker (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Dan Carpenter May 16, 2010, 6:31 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index 5a08be0..fbd80fb 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -455,7 +455,7 @@  static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
 			r = PTR_ERR(lc->io_req.client);
 			DMWARN("couldn't allocate disk io client");
 			kfree(lc);
-			return -ENOMEM;
+			return r;
 		}
 
 		lc->disk_header = vmalloc(buf_size);