From patchwork Wed Aug 8 14:52:51 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: 10560153 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 BFFB596FA for ; Wed, 8 Aug 2018 14:53:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF99F29EBB for ; Wed, 8 Aug 2018 14:53:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3EAC2A129; Wed, 8 Aug 2018 14:53:04 +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 5870A2A543 for ; Wed, 8 Aug 2018 14:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727591AbeHHRNE (ORCPT ); Wed, 8 Aug 2018 13:13:04 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34362 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727523AbeHHRND (ORCPT ); Wed, 8 Aug 2018 13:13:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZyLwI4sgvja+0Ycu3vAV26ibNU7Uv/4nQC9cLsBjj64=; b=secgVkqQBA6u88MjCoUxATCklS oIkcISCvI+70OECn+FRkJr0iq98sA3sElBymFQHB6KCKbRknBtErq7Obeq2impHroJ4clBiE55q0Y PKDwpKpcTXa1j5xUNyEzDHpTQCWhqtm0tbCMOY2WkNuGLAbCp2m6ZwJK4DIhbE8QU8BUbEX8FxbHa OYvsck8XSf1ibTSxajK/Im02IKoC7z9/EaGh2aZrsDjIu4HT3lYLG6IcyoDrOA4FKVlr3o87ktFwu 4EH+3oV5fSx2/83uIkpmbSXG4sDDQmdpaApOj0ppMmoqP+fBBRwLxofgwZ9RrBfMWW6Wcoj3I6XM3 sA/tb0OQ==; 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-0002bV-Ii; Wed, 08 Aug 2018 14:52:59 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1fnPpY-0000N4-Op; Wed, 08 Aug 2018 10:52:56 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Kukjin Kim , Krzysztof Kozlowski , Sylwester Nawrocki , Hans Verkuil , Al Viro , Marek Szyprowski , Julia Lawall , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted Date: Wed, 8 Aug 2018 10:52:51 -0400 Message-Id: <577a6299b1881c011bb82adb8a321ce72599a33c.1533739965.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.17.1 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 routines expect a poll flag, and not error codes. So, instead of returning -ERESTARTSYS if the mutex got interrupted, return EPOLERR, just like the V4L2 VB2 code. Solves this sparce warning: drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: warning: incorrect type in return expression (different base types) drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: expected restricted __poll_t drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: got int Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c index e9ff27949a91..c9d2f6c5311a 100644 --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c @@ -713,7 +713,7 @@ static __poll_t gsc_m2m_poll(struct file *file, __poll_t ret; if (mutex_lock_interruptible(&gsc->lock)) - return -ERESTARTSYS; + return EPOLLERR; ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait); mutex_unlock(&gsc->lock);