From patchwork Wed Aug 8 14:52:54 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: 10560147 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 ED22A13BB for ; Wed, 8 Aug 2018 14:53:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAC2829EBB for ; Wed, 8 Aug 2018 14:53:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEC2B2A17E; Wed, 8 Aug 2018 14:53:03 +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 13E4229EBB for ; Wed, 8 Aug 2018 14:53:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbeHHRNB (ORCPT ); Wed, 8 Aug 2018 13:13:01 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34336 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbeHHRNB (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=xWP6db8fUMCUU7QLu2/Z+Rbj4oN2Dq90t1H229KvlPA=; b=KjMLblqulaDmiK20D2zd2UUpd PQHhJl55pFyQuUUJAOsbGTDWu7pqi1r8VY6Fe43fnK0Hbcg3QbELdgkDxlneCpWSYgPcy5RH5IEtU 4SlDOF7j/SIZcp26dq7TNmKEmv4B+/QbPwZXUaxdgb8gQ0YJVYiqz8z7G3HVCn1OnytiG/ZXh3bIl dY9/YAeJceKIJxC2qJ773jFDip4Kwe0TlwfnHC/TxeDQIBC6Mw5+IxIuT5EhZ+hZ3CqJPCSDlq2xY xincvwsJlbUKOHFXSBzqZiOV3ScboYNPouwzbKmlYGFra30QdYipLqTM5EcKgaDhlQmyhWS1IHp9/ kSg23BAPw==; 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-0002bR-HD; Wed, 08 Aug 2018 14:52:59 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1fnPpY-0000NF-Rl; Wed, 08 Aug 2018 10:52:56 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Al Viro , Bhumika Goyal , Alexey Klimov , Markus Elfring Subject: [PATCH 4/6] media: radio-wl1273: fix return code for the polling routine Date: Wed, 8 Aug 2018 10:52:54 -0400 Message-Id: <0d8ff43fefdef24efba952540c557b8f2b418ac3.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/radio/radio-wl1273.c:1099:24: warning: incorrect type in return expression (different base types) drivers/media/radio/radio-wl1273.c:1099:24: expected restricted __poll_t drivers/media/radio/radio-wl1273.c:1099:24: got int Signed-off-by: Mauro Carvalho Chehab --- drivers/media/radio/radio-wl1273.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 8f9f8dfc3497..11aa94f189cb 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c @@ -1096,7 +1096,7 @@ static __poll_t wl1273_fm_fops_poll(struct file *file, struct wl1273_core *core = radio->core; if (radio->owner && radio->owner != file) - return -EBUSY; + return EPOLLERR; radio->owner = file;