Received: by 10.223.164.202 with SMTP id h10csp2276933wrb; Sat, 18 Nov 2017 17:54:18 -0800 (PST) X-Google-Smtp-Source: AGs4zMZgL5hEONXaNI6i/pqPjaHlvvRWvWSHRd8tzY6JxBXhsaXsMwM7nFu8OpXMVYpQAqC9Klve X-Received: by 10.159.231.2 with SMTP id w2mr9535433plq.286.1511056458822; Sat, 18 Nov 2017 17:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511056458; cv=none; d=google.com; s=arc-20160816; b=W6Pqd6l7MHZBaZTIscdbuJ+npah0QfI08hoOZGZcjL17e4ye6N0sWbA/DS2Y6bZRCs IEi4SY8K2qMf+G8632nOU8wdHT4i7+R+B1mYqgo9ArbwlkZvnmA082Gsegkmk+NENzHR bamGwdPMJOxCRi+2jkN0yu8HdOyaF2UDXr0xzByGwB1nANLYm6rIS9cA822sk0XBraBb wHKRbuVm6OVc/ooLIhxblkgr9txE6C4P6hP2kdRHLLmk6TWO+LRCalwPHAQAi0+CDHoQ gsz8NWeUklQ7VeolQVOA6810fKBTgc71AIx9/7vaIBigDAOgPNiOuBpCNSpUE85nFEyw GJ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=6st5pH480NgdUa7vSLK9Qitn2Bv9JG11mk505bf5eKM=; b=pcFU6qvU9UYn/RRybIq/oDf7Mx+TPRzyxGyK4/Nt5hH2OW60L0s4Qd2r3HeInYVqS3 I66soQdIzLqqm/7bas0lMfrolgDh/7Lt08dj0h/4UJn5uO6R7Wgc6iu+2b7g3xlJ6ofy P00vuPDDCXr7OeMDtZDdhjrlAkJYEsX++jChSNsgJyMYGV+O10Ebgh6Zjd1+RSWmN4vj Kl7Fzwrb/XwiGKFza2xeEdSTSrvPdECEa1oPfgLM9i5d0u9/nXKGaynUF2Su9TdtZyps yyNlAGB+lB9tyH1XI4syq5QOv/NhC4S7G2x8HmGsXjzKPAxLhp9Z1bYq0FVUUAfnq++o /51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O2q0DPpu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si5894271pff.45.2017.11.18.17.54.05; Sat, 18 Nov 2017 17:54:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O2q0DPpu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937619AbdKRF2O (ORCPT + 93 others); Sat, 18 Nov 2017 00:28:14 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35497 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932543AbdKRF2H (ORCPT ); Sat, 18 Nov 2017 00:28:07 -0500 Received: by mail-pg0-f68.google.com with SMTP id l19so3486617pgo.2 for ; Fri, 17 Nov 2017 21:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6st5pH480NgdUa7vSLK9Qitn2Bv9JG11mk505bf5eKM=; b=O2q0DPpur30JF7nEHQm4DmLlD/N7a5uYnYZpCItzfrFFaFTocGiJAmZ1prkHnmCaDd 4i5qwYp1GSLcbrNVq0cHxsj9dgRxwKj/Ct28bhS7EnawiNjh+aH38bYS0lLKUv51bgzm b1nYXNXYp3nqmj21gDMRuSF95eFikZRw8vpNaGzxIX2aoY9r4mlnIf72E225hkTIYXSZ Gm8lGfcU3QByDl+EDbgP7l2152h+7tg+91sCS3M8YNsZF10LFDa4gNvty/hnyoN0AQYk D0NozXAtVmUFd5B3jO79AzeXKrQi82b0sHoOWlDucWeAcKgMnfX61aSeMj32pWWeqvhM sF8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6st5pH480NgdUa7vSLK9Qitn2Bv9JG11mk505bf5eKM=; b=NDgVsZ7NSH9YZNOYN12eI9CUb7nhqnNAtRLl/9bdZbcborHCwNc6oXEfQhmoTwCXUG aoVUTGfsuNoVROzDF3ZU/ItmybzvEjZSAMcp3qRs9RCo0FBzcwvzemXnU/Xn6iZUDBUI Q28s5R738/54InoKLnSEKpnxHy1c2pjcMikufgomVtqljQwGEztD5XOTxkD/Ms5PcrDt +y6RsbzEYV+Bjg9aLQpEhQ/Oq969/R2jARLMHcPdJ2Dg7mMnXiCUa5nne+Ph0l2CdwCV +cnQpypAwFARSvN7K/KOp5It0DzrnGNyAbYy+BYwHaM5MELD/JE72S7suGe+f/vLF1vX cdpA== X-Gm-Message-State: AJaThX6A+k+KvF5nf9b5hf9Q5zniB8I6PlERe8XLOqb2o6AJdd5Up5e4 bUSDyARChboIdS12/AXB2ak2Q6jI X-Received: by 10.101.82.129 with SMTP id y1mr7301483pgp.137.1510982886843; Fri, 17 Nov 2017 21:28:06 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id d15sm10559781pfj.163.2017.11.17.21.28.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 21:28:05 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 1/5 v2] ASoC: ep93xx-ac97: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 10:57:51 +0530 Message-Id: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_get_irq() function returns negative if an error occurs. zero or positive number on success. platform_get_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- changes in v2 : irq was unsigned. so changed it to signed. sound/soc/cirrus/ep93xx-ac97.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index bbf7a92..b86b83b 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -365,7 +365,7 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) { struct ep93xx_ac97_info *info; struct resource *res; - unsigned int irq; + int irq; int ret; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); @@ -378,8 +378,8 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) return PTR_ERR(info->regs); irq = platform_get_irq(pdev, 0); - if (!irq) - return -ENODEV; + if (irq < 0) + return irq; ret = devm_request_irq(&pdev->dev, irq, ep93xx_ac97_interrupt, IRQF_TRIGGER_HIGH, pdev->name, info); -- 2.7.4 From 1584369524800906590@xxx Sat Nov 18 02:35:23 +0000 2017 X-GM-THRID: 1584369524800906590 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread