2021-09-29 12:30:32

by Paolo Pisati

[permalink] [raw]
Subject: [PATCH] media: atomisp: add missing return type (fix -Werror=return-type)

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
1649 | }
| ^
cc1: some warnings being treated as errors

Signed-off-by: Paolo Pisati <[email protected]>
---
.../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++
1 file changed, 2 insertions(+)

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..f36dadb5230a 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
@@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor(
default:
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
}
+
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
}

// Test flags and set structure.
--
2.30.2


2021-09-29 13:15:42

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: add missing return type (fix -Werror=return-type)

On Wed, Sep 29, 2021 at 02:26:38PM +0200, Paolo Pisati wrote:
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
> 1649 | }
> | ^
> cc1: some warnings being treated as errors
>
> Signed-off-by: Paolo Pisati <[email protected]>

This was fixed a long time ago. Please work against an up-to-date tree.

regards,
dan carpenter