lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ccc76c85-b6ee-aafb-b4dc-801dc10ef001@linux.microsoft.com>
Date:   Fri, 24 Sep 2021 17:12:50 +0530
From:   Praveen Kumar <kumarpraveen@...ux.microsoft.com>
To:     Arnd Bergmann <arnd@...nel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pavel Skripkin <paskripkin@...il.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        linux-media@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On 24-09-2021 17:01, Praveen Kumar wrote:
> On 02-08-2021 20:08, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@...db.de>
>>
>> The input_system_configure_channel_sensor() function lost its final
>> return code in a previous patch:
>>
>> 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]
>>
>> Restore what was there originally.
>>
>> Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> ---
>>  .../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..712e01c37870 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_NO_ERROR;
> 
> I would recommend to return "status" instead of INPUT_SYSTEM_ERR_NO_ERROR,
> this will take care of sending correct return code, we encounter in different case statements.
> Something like below would be better. Thanks.
> 
> -               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
> +               status = INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
>         }
> +       return status;

Please ignore this comment. My bad, we don't reach anytime here during failure.

Regards,

~Praveen.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ