From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takahiro Yasui Subject: [PATCH] dm-log: fix return value in create_log_context function Date: Wed, 03 Dec 2008 20:15:10 -0500 Message-ID: <49372F1E.5060200@redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development List-Id: dm-devel.ids Hi, This is very trivial fix, but let me post it to improve code readability. In the current implementation, caller function does not use the return value and no action is changed. Regards, --- Takahiro Yasui Hitachi Computer Products (America) Inc. When dm_io_client_create function fails in create_log_context function, return value is set to variable r but it is not used. r should be returned. Signed-off-by: Takahiro Yasui --- drivers/md/dm-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.28-rc7/drivers/md/dm-log.c =================================================================== --- linux-2.6.28-rc7.orig/drivers/md/dm-log.c +++ linux-2.6.28-rc7/drivers/md/dm-log.c @@ -461,7 +461,7 @@ static int create_log_context(struct dm_ 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);