All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging : media : atomisp : input_system.c : fixes the error of control reaches end of non-void function [-Werror=return-type]
@ 2021-10-14 22:30 Kushal Kothari
  2021-10-15  2:26 ` [Outreachy kernel] " Alison Schofield
  2021-10-15 12:04 ` Fabio M. De Francesco
  0 siblings, 2 replies; 7+ messages in thread
From: Kushal Kothari @ 2021-10-14 22:30 UTC (permalink / raw)
  To: mike.rapoport, outreachy-kernel, mchehab, sakari.ailus, gregkh,
	kushalkothari2850
  Cc: Kushal Kothari

The compiler cannot tell from that code if the function will ever reach
the end and still return something. To make that clear, replaced the last
line with just "else" which fixes the error of "error: control reaches end of non-void function [-Werror=return-type]"

Signed-off-by: Kushal Kothari <kushalkothari285@gmail.com>
---
 .../media/atomisp/pci/hive_isp_css_common/host/input_system.c    | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
index 8e085dda0c18..91bad8f34efc 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
@@ -1587,6 +1587,7 @@ static input_system_err_t input_system_configure_channel_sensor(
 	status = set_source_type(&config.source_type, channel.source_type,
 				 &config.source_type_flags);
 	if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+	else return status;
 
 	// Check for conflicts on source (implicitly on multicast, capture unit and input buffer).
 
-- 
2.25.1



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

end of thread, other threads:[~2021-10-15 15:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-14 22:30 [PATCH] staging : media : atomisp : input_system.c : fixes the error of control reaches end of non-void function [-Werror=return-type] Kushal Kothari
2021-10-15  2:26 ` [Outreachy kernel] " Alison Schofield
2021-10-15  8:54   ` Kieran Bingham
2021-10-15 12:04 ` Fabio M. De Francesco
2021-10-15 12:18   ` Fabio M. De Francesco
2021-10-15 14:52     ` Julia Lawall
2021-10-15 15:11       ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.