From patchwork Sat Apr 21 00:41:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10353933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E53A602B1 for ; Sat, 21 Apr 2018 00:44:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F94A288B8 for ; Sat, 21 Apr 2018 00:44:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1412D288BF; Sat, 21 Apr 2018 00:44:50 +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 BDB2F288B8 for ; Sat, 21 Apr 2018 00:44:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753436AbeDUAoh (ORCPT ); Fri, 20 Apr 2018 20:44:37 -0400 Received: from onstation.org ([52.200.56.107]:49866 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbeDUAmM (ORCPT ); Fri, 20 Apr 2018 20:42:12 -0400 Received: from xilitla.hsd1.wv.comcast.net (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id E5A2B64C; Sat, 21 Apr 2018 00:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1524271331; bh=/AS7XsNHTSs4H6FSkpLPUROwSG6u6JE0gQBBdex9mGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N0IS5y92aUMmJIFLbezq0aun4Gsg0+KKCOd7ObXJXzf/9R6vQVX9ReEmY2dyvI4ej 5YEAZTfPIu9tt4i4oRvDr+x+Ch6X9xnBbnBcw32T9mYW58FUtH9PjTSaisoYjkOhT6 gL6fS2bMT9bxTikEQU2Y7+hU3PnqlP3oMpH25WAE= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 03/13] staging: iio: tsl2x7x: don't return error in IRQ handler Date: Fri, 20 Apr 2018 20:41:43 -0400 Message-Id: <20180421004153.19073-4-masneyb@onstation.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180421004153.19073-1-masneyb@onstation.org> References: <20180421004153.19073-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP tsl2x7x_event_handler() could return an error and this could cause the interrupt to remain masked. We shouldn't return an error in the interrupt handler so this patch always returns IRQ_HANDLED. An error will be logged if one occurs. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 9cdcc8c9e812..95a00b965c5e 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -1320,7 +1320,7 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private) ret = tsl2x7x_read_status(chip); if (ret < 0) - return ret; + return IRQ_HANDLED; /* What type of interrupt do we need to process */ if (ret & TSL2X7X_STA_PRX_INTR) { @@ -1341,9 +1341,7 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private) timestamp); } - ret = tsl2x7x_clear_interrupts(chip, TSL2X7X_CMD_PROXALS_INT_CLR); - if (ret < 0) - return ret; + tsl2x7x_clear_interrupts(chip, TSL2X7X_CMD_PROXALS_INT_CLR); return IRQ_HANDLED; }