linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: fix control reaches end of non-void function error
@ 2021-09-10 22:37 Shuah Khan
  2021-09-13  8:41 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2021-09-10 22:37 UTC (permalink / raw)
  To: mchehab, sakari.ailus, gregkh, paskripkin
  Cc: Shuah Khan, linux-media, linux-staging, linux-kernel

Fix the following build error with -Werror=return-type enabled. Fix
input_system_configure_channel_sensor() to return status when control
reaches the end.

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o
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 | }

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
---
 .../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..5d088d6fb01f 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,7 @@ static input_system_err_t input_system_configure_channel_sensor(
 	default:
 		return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
 	}
+	return status;
 }
 
 // Test flags and set structure.
-- 
2.30.2


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

* Re: [PATCH] media: atomisp: fix control reaches end of non-void function error
  2021-09-10 22:37 [PATCH] media: atomisp: fix control reaches end of non-void function error Shuah Khan
@ 2021-09-13  8:41 ` Dan Carpenter
  2021-09-13 14:24   ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2021-09-13  8:41 UTC (permalink / raw)
  To: Shuah Khan
  Cc: mchehab, sakari.ailus, gregkh, paskripkin, linux-media,
	linux-staging, linux-kernel, Mauro Carvalho Chehab

On Fri, Sep 10, 2021 at 04:37:00PM -0600, Shuah Khan wrote:
> Fix the following build error with -Werror=return-type enabled. Fix
> input_system_configure_channel_sensor() to return status when control
> reaches the end.
> 
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o
> 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 | }
> 
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

Hi Shuah,

You're the third person to send this patch recently but it was fixed on
Aug 2 in staging-next in commit 05344a1d2ea7 ("media: atomisp: restore
missing 'return' statement").  What tree are you working against?  It
seems like it needs to be backported somewhere.

regards,
dan carpenter


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

* Re: [PATCH] media: atomisp: fix control reaches end of non-void function error
  2021-09-13  8:41 ` Dan Carpenter
@ 2021-09-13 14:24   ` Shuah Khan
  0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2021-09-13 14:24 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: mchehab, sakari.ailus, gregkh, paskripkin, linux-media,
	linux-staging, linux-kernel, Mauro Carvalho Chehab, Shuah Khan

On 9/13/21 2:41 AM, Dan Carpenter wrote:
> On Fri, Sep 10, 2021 at 04:37:00PM -0600, Shuah Khan wrote:
>> Fix the following build error with -Werror=return-type enabled. Fix
>> input_system_configure_channel_sensor() to return status when control
>> reaches the end.
>>
>> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o
>> 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 | }
>>
>> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
> 
> Hi Shuah,
> 
> You're the third person to send this patch recently but it was fixed on
> Aug 2 in staging-next in commit 05344a1d2ea7 ("media: atomisp: restore
> missing 'return' statement").  What tree are you working against?  It
> seems like it needs to be backported somewhere.
> 

I am working on Linux 5.15 - should have checked staging next though before
sending the patch :)

thanks,
-- Shuah


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

end of thread, other threads:[~2021-09-13 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 22:37 [PATCH] media: atomisp: fix control reaches end of non-void function error Shuah Khan
2021-09-13  8:41 ` Dan Carpenter
2021-09-13 14:24   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).