From patchwork Wed Aug 8 14:52:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10560143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF77296FA for ; Wed, 8 Aug 2018 14:53:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAECE2A071 for ; Wed, 8 Aug 2018 14:53:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEE812A129; Wed, 8 Aug 2018 14:53:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71AB42A543 for ; Wed, 8 Aug 2018 14:53:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbeHHRNB (ORCPT ); Wed, 8 Aug 2018 13:13:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34318 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727516AbeHHRNB (ORCPT ); Wed, 8 Aug 2018 13:13:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=x8KsiKAP/0C/BDbxDnTptWL8h/E1DPhGkTbv2vZgKVQ=; b=nWHg7wjpbvEYDhc6j1MO9923o CsM7Ihf31SzAzTo66oFrITK5JnjI3K01cHPws2/47XA2kgq9Osc766yui2vZOJdZeivaN86Ssl/wq kDGwUQSuBsDVPum9LABHzFO2qNWjIcKVJ7OGgo+xJtbiylbpYm2yRNxbxSJVsnIYRVHBk0bp33Dxq oN6/gGY+1riue/FrQbjEwUu2kDvOezUMZMeHhFBwRSMi1q9ayybU5U0B0oVgkOD15XH1CUxylWSGq UiJkABwYbXXKcq9LBhaVcKvc6igNs/jCDCcSJmk0olMzf3xgBZG0ZCTB+mxIl5mbkKTpSgO333qN2 shoiAtExw==; Received: from [179.95.6.4] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fnPpb-0002bO-GR; Wed, 08 Aug 2018 14:52:59 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1fnPpY-0000NB-Qm; Wed, 08 Aug 2018 10:52:56 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Sylwester Nawrocki , linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/6] media: s3c-camif: fix return code for the polling routine Date: Wed, 8 Aug 2018 10:52:53 -0400 Message-Id: <5840115d72dcbf018f48f180a13e87212cc76ca3.1533739965.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org> References: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org> In-Reply-To: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org> References: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All poll handlers should return a poll flag, and not error codes. So, instead of returning an error, do the right thing here, e. g. to return EPOLERR on errors, just like the V4L2 VB2 code. Solves the following sparse warning: drivers/media/platform/s3c-camif/camif-capture.c:604:21: warning: incorrect type in assignment (different base types) drivers/media/platform/s3c-camif/camif-capture.c:604:21: expected restricted __poll_t [usertype] ret drivers/media/platform/s3c-camif/camif-capture.c:604:21: got int Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/s3c-camif/camif-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c index b1d9f3857d3d..c02dce8b4c6c 100644 --- a/drivers/media/platform/s3c-camif/camif-capture.c +++ b/drivers/media/platform/s3c-camif/camif-capture.c @@ -601,7 +601,7 @@ static __poll_t s3c_camif_poll(struct file *file, mutex_lock(&camif->lock); if (vp->owner && vp->owner != file->private_data) - ret = -EBUSY; + ret = EPOLLERR; else ret = vb2_poll(&vp->vb_queue, file, wait);