From: Praveen Kumar <kumarpraveen@linux.microsoft.com>
To: Arnd Bergmann <arnd@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pavel Skripkin <paskripkin@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement
Date: Fri, 24 Sep 2021 17:01:10 +0530 [thread overview]
Message-ID: <a472d0f0-2be4-5f95-7106-5d580b28cac6@linux.microsoft.com> (raw)
In-Reply-To: <20210802143820.1150099-1-arnd@kernel.org>
On 02-08-2021 20:08, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.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@arndb.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;
Regards,
~Praveen.
next prev parent reply other threads:[~2021-09-24 11:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 14:38 [PATCH] media: atomisp: restore missing 'return' statement Arnd Bergmann
2021-08-02 15:36 ` Sakari Ailus
2021-08-13 16:38 ` Kees Cook
2021-08-19 17:24 ` Andy Shevchenko
2021-08-19 19:22 ` Pavel Skripkin
2021-08-21 5:53 ` Kees Cook
2021-08-21 6:36 ` Mauro Carvalho Chehab
2021-09-24 11:31 ` Praveen Kumar [this message]
2021-09-24 11:42 ` Praveen Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a472d0f0-2be4-5f95-7106-5d580b28cac6@linux.microsoft.com \
--to=kumarpraveen@linux.microsoft.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=paskripkin@gmail.com \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).