From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out28-172.mail.aliyun.com (out28-172.mail.aliyun.com [115.124.28.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87ABD71 for ; Thu, 17 Jun 2021 06:38:43 +0000 (UTC) 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) X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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