Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605256 > unrolled thread

[PATCH 1/4 V2] staging: atomisp: remove else statement after return

Started byDaeseok Youn <daeseok.youn@gmail.com>
First post2017-03-21 03:20 +0100
Last post2017-03-21 03:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/4 V2] staging: atomisp: remove else statement after return Daeseok Youn <daeseok.youn@gmail.com> - 2017-03-21 03:20 +0100

#1605256 — [PATCH 1/4 V2] staging: atomisp: remove else statement after return

FromDaeseok Youn <daeseok.youn@gmail.com>
Date2017-03-21 03:20 +0100
Subject[PATCH 1/4 V2] staging: atomisp: remove else statement after return
Message-ID<tnhyW-5bM-7@gated-at.bofh.it>
It doesn't need to have else statement after return.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
V2: one(2/4) of this series was updated so I tried to send them again.

 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
index d97a8df..8bdb224 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
@@ -2958,11 +2958,11 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag,
 		dev_err(isp->dev, "copy to user failed: copied %d bytes\n",
 			ret);
 		return -EFAULT;
-	} else {
-		list_del_init(&md_buf->list);
-		list_add_tail(&md_buf->list, &asd->metadata[md_type]);
 	}
 
+	list_del_init(&md_buf->list);
+	list_add_tail(&md_buf->list, &asd->metadata[md_type]);
+
 	dev_dbg(isp->dev, "%s: HAL de-queued metadata type %d with exp_id %d\n",
 		__func__, md_type, md->exp_id);
 	return 0;
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web