From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-24.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBFA9C433FE for ; Fri, 24 Sep 2021 11:43:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4A0961164 for ; Fri, 24 Sep 2021 11:43:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343562AbhIXLoc (ORCPT ); Fri, 24 Sep 2021 07:44:32 -0400 Received: from linux.microsoft.com ([13.77.154.182]:40882 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244321AbhIXLob (ORCPT ); Fri, 24 Sep 2021 07:44:31 -0400 Received: from [192.168.1.87] (unknown [223.184.74.135]) by linux.microsoft.com (Postfix) with ESMTPSA id B7EE420A3A05; Fri, 24 Sep 2021 04:42:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B7EE420A3A05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1632483778; bh=6J74lWd/6CyVUNTeXTJr/cLogZniLMul6d8MzGOSJS0=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=jRWNVqsKRfiizxQADhHcgkJDxWAl8h/Iy1IJ0/sHZD9c3lSCsnHBXM747S10ga9ZT n4HG4MIut8vWrigJRFqcAqmZq5TRU94qLdsxwfxQAA5cLc3Fgl0gYXqQDUUdnbvWPO HMaRuqMjcUzG8Q37AxbMgUz/ROMzZL9KaiDsR1t8= Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement From: Praveen Kumar To: Arnd Bergmann , Mauro Carvalho Chehab , Greg Kroah-Hartman , Pavel Skripkin Cc: Arnd Bergmann , Sakari Ailus , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20210802143820.1150099-1-arnd@kernel.org> Message-ID: Date: Fri, 24 Sep 2021 17:12:50 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24-09-2021 17:01, Praveen Kumar wrote: > On 02-08-2021 20:08, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> 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 >> --- >> .../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.