Received: by 10.223.164.202 with SMTP id h10csp2350026wrb; Sat, 18 Nov 2017 19:57:00 -0800 (PST) X-Google-Smtp-Source: AGs4zMbHeIGt9dhkNtKAnizC1+lzprBayEJCtlwuo1LIJY+azaDRzAs/OV+1WexD9faQct5zU0eN X-Received: by 10.159.240.138 with SMTP id p10mr9865184plr.360.1511063820145; Sat, 18 Nov 2017 19:57:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063820; cv=none; d=google.com; s=arc-20160816; b=FQvIyUATTplsyAQNfeO28kYMJpeGT7W36wQilFk0mIkvQUIP9Dl+kfgcU3vIVHvsay tka6K+HDiHZBRn77lPM6VOkZpxLAJmF2HnyOlC6tP5lMeM38BjRjI01kOZ2Wjd9Ihg1Q iArf4Rpm35Rq3x3lZaSsqZJy9fXP+LbMMpmAlvyXI8BihJvquK4JX8rz0lkpjYRBCNVz IF+j3TkMzH73rEeB0WWOvWkkdkQB4NPBOSw3U4dia53Sdvb8s4o1fim4mzu0HGbG6kkS 5lS+OEWpv/0xPkLRTn4cK9CyytfARzBPREvOSj/VogAiZHCNBpUylT+JAnkW2Hri2r1P HoFw== 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=0b4kJDBKvMkp8TzZ7AgmwSwWNqmH1ri+4ay2iE+vdLs=; b=Ns7gcnKyMfJqbrZM/KxYU1mwlSOVPn+5BQ4MXw9Us11OMwCHQeh8QIrOuTiPO0nxri kkwg7hs4zpxhSo6qJT4xUJIY/ME6eug6gx0juty4KX8XrDJ164NHGpfMFRsN0xxKLfCa +/3leZX1Rjavv11Inl92+B/5uCCrSTwb4KUAMHwFF9gnuL+oHEadF7/hpmABZJpkmaGT BBCYoFdnqucEQIvc+2muGrglsNMTGImRwgT1VtfzWiNbNabo+08LgqWyjtP0U/8QObtL 0gY0Nuv49RpIxJlOhEHp71dVDyldiz0ZT6MNezLdi2S5d+cVA5uU8Pm3PNpVH0Ek7M0S DGlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nKERgMtR; 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 j14si5451450pga.407.2017.11.18.19.56.47; Sat, 18 Nov 2017 19:57:00 -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=nKERgMtR; 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 S1163402AbdKRJ5K (ORCPT + 93 others); Sat, 18 Nov 2017 04:57:10 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:38175 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161935AbdKRJ47 (ORCPT ); Sat, 18 Nov 2017 04:56:59 -0500 Received: by mail-pf0-f194.google.com with SMTP id r62so3761370pfd.5 for ; Sat, 18 Nov 2017 01:56:59 -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=0b4kJDBKvMkp8TzZ7AgmwSwWNqmH1ri+4ay2iE+vdLs=; b=nKERgMtRTdwe35gRO/d4SmfNbDbmD43B+AZAm6gPnKvKY3xeq6zwRkia73eHJA0/nd Svi5M/Gykm83H7qQYeN/z/+HB7POesz31HcqJg65XtZx0rwLZB+w30BhZ1a2WBTnLdh0 ovNVI2JhG3g1nKXKt+9wf/DWX1mjb89yC8qZIHUSM6+dRwT9lATgXrqi9vTK1c4vWYTH q7Ik+oEXlL+aCr0DEou03KhcVFzj5aUZghGf+KKTJBdX1rZwXmmccZK5yq3ASaQn8m8Q TzBYM4FsF27QKQwv3oQAMOO1FcezjyySMuEDVwQECWq7UH2w9BbPL1Ehb8SMxJUiPME3 JOlA== 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=0b4kJDBKvMkp8TzZ7AgmwSwWNqmH1ri+4ay2iE+vdLs=; b=POT/rsqkyVnXLfPdnL9F+HtIAeZnT3S0bhRHq1raZbTVVdaygy1WNydg2m0LrR4VdC BtTcaAVqHbgPZ/oqYBNlv/k1lW6sIQCLIG1mFCnDMq/yJxPryN6CI3s/YBJlOpmI+6n5 X+RhyuQmx99G2XF4W/I2o0aGV/6H3SKEuDOsc4lnEm1hXhLCLD3paiij/bg1fD51+npv UUKwgZ/2ByLqUXuWd1QriE0duDzpU0DEtju18fC2qRfSxXMVejIKEj5fYHkaTfOmWEfG raL4k6Zbr1gsHcTlobYVRtXU1vgrtbDFFr84DEqa9biGllmPRIygqbaQnKHB0KBX6Ll+ H6vg== X-Gm-Message-State: AJaThX7F0k1/ZZzTSsdzLQm/5RjOZixHUUzFYqfuV43nUeXAnqmlFgIV v1j21MGEUEERtHGRMqPEauE= X-Received: by 10.159.252.198 with SMTP id o6mr7834449pls.390.1510999019442; Sat, 18 Nov 2017 01:56:59 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r16sm8862577pgt.72.2017.11.18.01.56.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:56:58 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com, linux@armlinux.org.uk Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/3 v3] ASoC: ep93xx-ac97: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 15:26:45 +0530 Message-Id: <874375c0dca41790e47b60ce30f88ab353f97b38.1510997839.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. changes in v3 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. 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 1584391141354208823@xxx Sat Nov 18 08:18:58 +0000 2017 X-GM-THRID: 1584391141354208823 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread