Received: by 10.223.164.202 with SMTP id h10csp2366812wrb; Sat, 18 Nov 2017 20:24:00 -0800 (PST) X-Google-Smtp-Source: AGs4zMbOemuUOtlOhAT7lhTA2gT+F23wOdftRubgT3YNUDx6mz90IcInoegxppCWqDjeYBQXlRXL X-Received: by 10.159.255.71 with SMTP id u7mr9997003pls.41.1511065440179; Sat, 18 Nov 2017 20:24:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511065440; cv=none; d=google.com; s=arc-20160816; b=BVja6UNmHcsXWWIygx6c0GPJwfT7PzfWie79TDbT9t4VEWWMr5p20JaQZm7yuR2cNT vroPUWdxfMsSd/wHXs8AsEyiscyl0ilMPj/0Puyikqjkaoxc1QRl5KR8el9cVzZql3nR AhkCDec0rl7uscl6rqOD/YuCUzRhM5R6f8cSrrOouZ2H2jtw5KuiesvXHKWZQdUoyvmv uPd9HbuHvh9vrFb1t8WZzFf5P6dGYTucDY6KTIX3gE0+F8xA/c/YYrlk6DzaSkduBj7q dukJiYbdixlFPr5VENCGnpbZAmOXaODgwPtUlEZxLLypxMS+DKCiUqDeiONGNXoXPYl7 2TTg== 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=BuTlyBagUcsEkgcgw1Bv9Xk29Gbc9jafwwLYtOfW5Wg=; b=WyldhYpznUUlW3Sfq+Yhf2+r0G0BGNr3qrTkGmJhoB7qfEdBpvnWk03y2337oym2PB rUsBWKEThFzHxYcNK0qqTuiRBVnUzSV/cLHn2WCt0ZLvMUZu7mcZgBkTw+pU7AJgmLF4 NgH/tnGG2pZIxPHxEEusma8HNYp6CY2288GqLLGpnDNt0nUtDZocjfaO2JlQKhZfiqum gagVMwSVVsNZB1ALJQPKhF53toZgijPW10J8F7s5d1IOj5c+x/dRRnK9CyfBoshzQIQc D9Z9XG9balif87QDrLFKDrXX9Rtut1AqAH9NaJm1dGNlE7fmd0fqRxv98X4zaFVyoMzg /nEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eoayeiAd; 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 k9si5694526pll.510.2017.11.18.20.23.49; Sat, 18 Nov 2017 20:24: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=eoayeiAd; 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 S1751379AbdKSEPo (ORCPT + 75 others); Sat, 18 Nov 2017 23:15:44 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34937 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbdKSEPh (ORCPT ); Sat, 18 Nov 2017 23:15:37 -0500 Received: by mail-pg0-f68.google.com with SMTP id l19so4852857pgo.2 for ; Sat, 18 Nov 2017 20:15:37 -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=BuTlyBagUcsEkgcgw1Bv9Xk29Gbc9jafwwLYtOfW5Wg=; b=eoayeiAdjNg6Zi1Oz6diqi6Mn069LfEFr1M6/VoEjrBoGGnt/57sPlykroHd250VU9 Y/SHWFs5qhap6YNijVzmDcVIuljlHW9oc7UM+G8NdD9er7chfe6bt23jWxMu3vFHShZO P3lxIpLFj8pE/kN7qrB762JMzEUH9GLYFJnHXy+LJvhH54mL1jx1TjxU4OL4mJ4bzzS8 wbf3j2a4BIbLP2ZCFdygETvMDgwzZJ27YD+INv+KAE/y+xjT8o6kEuGdlx7M9XGCfbUQ 0O/Z0jED6CUcMyIzg0BrbGrrDA7cp04aGn9WCbtO8sAxTev4UBtTw/ilxtTlqkLt8nFC Hu/A== 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=BuTlyBagUcsEkgcgw1Bv9Xk29Gbc9jafwwLYtOfW5Wg=; b=PDmfNaR6fwqIS5HETPd6IU9V2ZaD8Ul57fphlV9gmtjg2n2h0o7LiP5v7iKyslz9o8 7H8Vks0s/wrhHn3ZNopluej7dO59JP/gY2CjxhMQXWptkHD92px+Sip8129S9XBCD5vn X5e6oVWST0sVghUyGMs02RWBAC+sOV+QeWczkLCMQlwj6J1sH59GEKbiHFF9GYvuZfos yKuxtzU9zLR7EYi0l3zJsWaHJGJ5OJ2VOlWO45PnAsjq1RXRFer1KL3/PicAL0u9UcJK YSwbtX1BAxb6g0uuMtrsFQcyPgeDolCdpySDWrV+N7RR+vkkz8LF/AugnPN4k579Ir0a WKOA== X-Gm-Message-State: AJaThX5MUOdpBrtxK0l7+Yp3HHe0AR3lWyAWhc+NqDUn5vgc5YJYGy3m W2wxKhgZkyoAU+OQW2dubHg= X-Received: by 10.98.76.206 with SMTP id e75mr7088024pfj.57.1511064937049; Sat, 18 Nov 2017 20:15:37 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id l14sm12741475pgn.35.2017.11.18.20.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 20:15:36 -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, linux@armlinux.org.uk Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 5/5 v3] ASoC: intel: mfld: Handle return value of platform_get_irq Date: Sun, 19 Nov 2017 09:45:04 +0530 Message-Id: <64135c4647a3a94261a669d7f49611a356f334bf.1511062844.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> References: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> In-Reply-To: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> References: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.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 platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. changes in v3 : Return EIO insted of ctx->irq_num. sound/soc/intel/boards/mfld_machine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 6f44acf..c819210 100644 --- a/sound/soc/intel/boards/mfld_machine.c +++ b/sound/soc/intel/boards/mfld_machine.c @@ -372,6 +372,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) /* retrive the irq number */ irq = platform_get_irq(pdev, 0); + if (irq <= 0) + return -ENODEV; /* audio interrupt base of SRAM location where * interrupts are stored by System FW */ -- 2.7.4 From 1584146241984451718@xxx Wed Nov 15 15:26:24 +0000 2017 X-GM-THRID: 1583408467635273168 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread