From patchwork Fri Feb 22 06:31:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10825279 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 507C6922 for ; Fri, 22 Feb 2019 06:33:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37A47312A6 for ; Fri, 22 Feb 2019 06:33:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2824D316CB; Fri, 22 Feb 2019 06:33:08 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D87B312A6 for ; Fri, 22 Feb 2019 06:33:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6116315F2; Fri, 22 Feb 2019 07:32:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6116315F2 Authentication-Results: alsa0.perex.cz; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="SOiBp6iJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="n28p5PKr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="iG4WzR/v" Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B67E3F80775; Fri, 22 Feb 2019 07:32:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B67E3F80775 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1550817133; bh=IX5cv3WfEEgw1inTsdqtCHKTedPkrgypFLZNIHfW3C0=; h=Date:From:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=SOiBp6iJSczmqeXqtupNo0xVQyQsmyEjiFlmdzlHnWqPVEMpc1ijxMd2O5F6BfPnV m7rUfvsVnQBG2gKl3+vCtTFh+VzMVYVzj/ILk2AnSFOyxWuRwm2tjURGTryl5B9j3k dIr7IXDLGVk0kslLWzrgcZytta76FKglf89xRXDo= X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5EB5CF8078A; Fri, 22 Feb 2019 07:32:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5EB5CF8078A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1550817131; bh=R/GvVg2AIrECNLS+7rwtuk1LksrHc33LH8m9xVUjEtg=; h=Date:From:To:Cc:Subject:From; b=n28p5PKr2BqPXggkGs+O7VArMaA+E1DFUxiMbNOzwdBYX4pyLWSro3pCxiifWoYIF QpFJo3z0M1vEdpvMsPWIWPsu0gZzYmgu0f22NszDNORADvXYRDU/F+jopos5IHccAw 8qETwwy1dTFe6Wlg1ADtt6vx1LoQOam5E8/G00BA= Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 16C0CF80775 for ; Fri, 22 Feb 2019 07:32:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16C0CF80775 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="iG4WzR/v" Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1M6TtBM157393; Fri, 22 Feb 2019 06:32:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=T8Co4Nkta3r14PsOp1pvx3Y/Q9+mA/atVdW6/eLGTRs=; b=iG4WzR/vwdceuaF0YBskd6VqK7XYzj+0FrmKhNd0I69MdRYQWlalOE/QK9xhezEHqjYA VeeTvkjGglWRnRzHCVzzg07C9QJxaHiwu2fph6EBRWK7C4Ri18rRF4iyA2e2f4Xqb+Z/ j6UkaQW0/j2Qy8/NUwGGEt+Dza1W5Qw+hmFplHEM2UcjQdp/ketf9Fy/ef/6bpkACSda /jx9PmLCIsq2JRJfxrnTMrSlfDPEI4MF03BeZI8iA/FrpFgV5Terh4hMdWwRTSb8R/ou HoGzwmsWYV331DTcFtPwjQ0GdEDxw9t6vaGDQsCmCHuUEWNh02kyvxK4QttbJ7AYMDu7 wg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2qp9xucgg2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Feb 2019 06:32:02 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1M6W1Mc002025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Feb 2019 06:32:01 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1M6W0TK023082; Fri, 22 Feb 2019 06:32:00 GMT Received: from kadam (/197.157.0.19) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Feb 2019 22:31:59 -0800 Date: Fri, 22 Feb 2019 09:31:51 +0300 From: Dan Carpenter To: Brian Austin , James Schulman Message-ID: <20190222063151.GC30993@kadam> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9174 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902220044 Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Takashi Iwai , Paul Handrigan , Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH] ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP The irq_get_irq_data() function doesn't return error pointers, it returns NULL. Fixes: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier") Signed-off-by: Dan Carpenter Reviewed-by: Charles Keepax Reviewed-by: James Schulman --- sound/soc/codecs/cs35l36.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index e374fffb7e17..901d57491218 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -1845,9 +1845,9 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client, cs35l36_apply_vpbr_config(cs35l36); irq_d = irq_get_irq_data(i2c_client->irq); - if (IS_ERR(irq_d)) { + if (!irq_d) { dev_err(&i2c_client->dev, "Invalid IRQ: %d\n", i2c_client->irq); - ret = PTR_ERR(irq_d); + ret = -ENODEV; goto err; }