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=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_2 autolearn=ham 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 26810C2B9F4 for ; Thu, 17 Jun 2021 05:39:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A03EA613DF for ; Thu, 17 Jun 2021 05:39:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A03EA613DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=magewell.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2yP6TgBEUL2q1Ip6BfvddqgY5S1Q7RUiwxCJ5Oog+E0=; b=PMQqwRdPTOK/op lrWf+OQ1pxTAs9+9LEQ7QW7I8Vzod7gVr+/PCXWfQo1SgoSamizd0qd/UX0ReAwB/D9v5zHLZi8Hn zSdVxlkhfAUYOd+xvSjPqGVSZ0o7fiKwCo60p2sh50SLtE6/O1Tw/yl8zX4lb6WfRx5HwL1s/kQ3Q tdwsYHIY8umfE4ewh9LZ6J2+XDBhdDVKzg/+Mnhf71yGL9S4AWTQAZy3vAML7HZuqHlShHGX1FsZK BGAKr3HoZiEJTQ/uiHO94inBD7DFxPKuHRk7RIi8TjloUCzbZYoYR105j+becspYRijgkTgKDYzu9 iAbr9lUsZgyCRPyiIUaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltkis-008w9Z-8Q; Thu, 17 Jun 2021 05:37:50 +0000 Received: from out28-50.mail.aliyun.com ([115.124.28.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltkin-008w8R-Ot for linux-arm-kernel@lists.infradead.org; Thu, 17 Jun 2021 05:37:47 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.09836061|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.0163458-0.00116024-0.982494; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047204; MF=yong.deng@magewell.com; NM=1; PH=DS; RN=11; RT=11; SR=0; TI=SMTPD_---.KTblfs9_1623908259; Received: from localhost(mailfrom:yong.deng@magewell.com fp:SMTPD_---.KTblfs9_1623908259) by smtp.aliyun-inc.com(10.194.98.226); Thu, 17 Jun 2021 13:37:40 +0800 Date: Thu, 17 Jun 2021 13:37:40 +0800 From: yong To: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Chen-Yu Tsai , Jernej Skrabec , Mauro Carvalho Chehab , Maxime Ripard , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 04/11] media: sun6i-csi: add a missing return code Message-ID: <20210617133740.00004d0a@magewell.com> In-Reply-To: <525bad50008338d96fb71e724675061ffa07ff87.1623846327.git.mchehab+huawei@kernel.org> References: <525bad50008338d96fb71e724675061ffa07ff87.1623846327.git.mchehab+huawei@kernel.org> Organization: Nanjing Magewell Electronics Co., Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210616_223746_030970_7A2F2B97 X-CRM114-Status: GOOD ( 14.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, It does not mean there is a error. As the comment, it just check if the csi is powered. On Wed, 16 Jun 2021 14:28:30 +0200 Mauro Carvalho Chehab wrote: > As pointed by smatch, there's a missing return code: > > drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:485 > sun6i_video_open() warn: missing error code 'ret' > > Signed-off-by: Mauro Carvalho Chehab > --- > drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c > b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c index > 3181d0781b61..07b2161392d2 100644 --- > a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +++ > b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c @@ -481,8 > +481,10 @@ static int sun6i_video_open(struct file *file) goto > fh_release; > /* check if already powered */ > - if (!v4l2_fh_is_singular_file(file)) > + if (!v4l2_fh_is_singular_file(file)) { > + ret = -EBUSY; > goto unlock; > + } > > ret = sun6i_csi_set_power(video->csi, true); > if (ret < 0) Thanks _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel