Received: by 10.223.164.202 with SMTP id h10csp2278160wrb; Sat, 18 Nov 2017 17:56:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMaSXaovID5719i+zP9Q4RjckV8UKzRtpmBSYo/ZYk8UGb0dz1h94B4uRVMotfMgNX2lXSjZ X-Received: by 10.84.130.66 with SMTP id 60mr9997109plc.376.1511056590353; Sat, 18 Nov 2017 17:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511056590; cv=none; d=google.com; s=arc-20160816; b=cRDZM2IiF07dDBZjmeCYMTvwzpT2w05Wabs7zCLJuFf5pZ8SPegCFNXhHNMHa608jM EuIaDN1cOAxmTldMRwuoohh393JSzrf7KfFGukwgbKRie4pAV1k4p4sjjW0I9NPRU3Mn Ypf51dCRNFAFEipSiyLKcd95P75ZzMGphbhGLSxUv+NIR9hIHxJp/PjcQ6brA1L5zHH8 w/4y7HG8jccmKBxhB9Fc/LdDFZZRGadmOa1a4i9DdDP2aLyt6QxvENak1B568s6ySz6a FQEnn8/BEa+g6vDoFm0mId+7Q5Udj8Evg2FUwZEcmfSLLi3SIr1CIw3XXCpQMPJZiZgV Vm/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=5+vWubTMkU4pzUJQ8sV7sz7wTwZxFRIhxjyz6m/Ye+Q=; b=eI7B+IyQmxZxngpAquPAr5LMoqyyqhk5YtOdWi8QLOG+zbgBI/sTESyBjqcl6JVQlk rPxQ4XYG+jeU9rJCdF3v/f5qkIpIaUAkv5Fy47sZLw35E0UcNLY3JAe33LKKoiYYjzPO o8NucnXEA1tzJuLLSOazKbu+DrzCe+nq5UA+hHzh1wXL+KEu3jbICjCx6zVt11MZhy7s SbM5fkHwPtVcqYR1+zeV4DOqbeeijQWsjehaG18g2ahNqKdKq0BKX8bbgd1ud4ODVabV gZqR5MnTwAWzot0hgA10azfP3VR17Un9HF/Kg2dU4yicq4ALqpqaF4dzb/2JBSvq2sbY aREw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qwP3pVU/; 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 p10si5348456pge.499.2017.11.18.17.56.17; Sat, 18 Nov 2017 17:56:30 -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=qwP3pVU/; 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 S1030558AbdKRF2p (ORCPT + 93 others); Sat, 18 Nov 2017 00:28:45 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:39652 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937617AbdKRF2O (ORCPT ); Sat, 18 Nov 2017 00:28:14 -0500 Received: by mail-pg0-f66.google.com with SMTP id 70so3477765pgf.6 for ; Fri, 17 Nov 2017 21:28:13 -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:in-reply-to:references :in-reply-to:references; bh=5+vWubTMkU4pzUJQ8sV7sz7wTwZxFRIhxjyz6m/Ye+Q=; b=qwP3pVU/YwePSSo1QujOZQ7VeSuSPLBnyChwCUIeTtuSqxNgAlG2exb4AIv0QqU9or zMmiLSuNWWqMJs+div56XmrdsyFM4ymb70xYuyvlliDFsFw2TwRF4PS+wYObYWxqsYyV Ot2EH14P2fRCImwZJOZXjCCtHIWplKHfvdCQl832KnhZZh0XLAZivpoOmY3yO0sxB79j X2p6MuDCTbR/4Y17grRBEiO683YKE3bbiL7Z418jadt39JKLqntYqPEgq29LL8QHwuaw /gy8KLXBAgAlsiNN2nZ4uLhrXJ93dxiixNxSjGNUDbGNtuOS1B1rOgRLnNl475L9xM3w i1lg== 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:in-reply-to :references:in-reply-to:references; bh=5+vWubTMkU4pzUJQ8sV7sz7wTwZxFRIhxjyz6m/Ye+Q=; b=YqsI9ojD9xF4Nz9WwwPGCYEqhoFQQUSISl2wFG3oTFQrEs0qBeyq6eZBvOkD0ukR+N YWYkEkSY8NwFKjCP1zUhaybsE0ybk8pNTu4WNBNrp9FG9Knyymb//lg9vxHJCdzlk3bP 7kYIgHv5x5Yb6DXzemCBoOnnDc3WMukCq5SYTRva6dzfZrPuSszcL5sliWnr6Q+ehBHz W2tnKWmfZpZRCDkURUDqRXbuuVk0mr5Xwhj8CTN2UqBSIpFAOm+xX/6nOUO1Bec+6jI8 LTtbrRxepCravuXpH2k/+wvQwU5YTvTLqM8rZY+OriXLkrWGQuaFGesSblqULVZkPvlh /LGQ== X-Gm-Message-State: AJaThX5X8CgRbgMnmkYy5Y8pyHkGGFk6eKeu7fm82YGLU8Y0Ufkc8US0 qdkFdwN2zqUNQueUiKtOf8Y= X-Received: by 10.98.190.6 with SMTP id l6mr4425225pff.53.1510982893405; Fri, 17 Nov 2017 21:28:13 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id d15sm10559781pfj.163.2017.11.17.21.28.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 21:28:12 -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 3/5 v2] ASoC: nuc900: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 10:57:53 +0530 Message-Id: <19f8c64a4720118a6d6c4fedd5f8defa6938d1db.1510982440.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> References: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> References: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> 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 : nuc900_audio->irq_num is unsigned. so handle through signed variable. sound/soc/nuc900/nuc900-ac97.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index b6615af..71fce7c 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev) goto out; } - nuc900_audio->irq_num = platform_get_irq(pdev, 0); - if (!nuc900_audio->irq_num) { - ret = -EBUSY; + ret = platform_get_irq(pdev, 0); + if (ret < 0) goto out; - } + nuc900_audio->irq_num = ret; nuc900_ac97_data = nuc900_audio; -- 2.7.4 From 1584369618743330980@xxx Sat Nov 18 02:36:53 +0000 2017 X-GM-THRID: 1584369618743330980 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread