From patchwork Wed Apr 15 23:16:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 6223291 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DD1C9BF4A6 for ; Wed, 15 Apr 2015 23:17:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8B462025B for ; Wed, 15 Apr 2015 23:17:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 52824201BB for ; Wed, 15 Apr 2015 23:17:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0380D2606A5; Thu, 16 Apr 2015 01:17:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 81C232605D3; Thu, 16 Apr 2015 01:17:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A5CEF2605EC; Thu, 16 Apr 2015 01:17:11 +0200 (CEST) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bn0107.outbound.protection.outlook.com [157.56.110.107]) by alsa0.perex.cz (Postfix) with ESMTP id F10B1260588 for ; Thu, 16 Apr 2015 01:17:03 +0200 (CEST) Received: from CY1PR03MB1485.namprd03.prod.outlook.com (0.163.17.158) by CY1PR03MB1472.namprd03.prod.outlook.com (0.163.17.157) with Microsoft SMTP Server (TLS) id 15.1.136.25; Wed, 15 Apr 2015 23:17:02 +0000 Authentication-Results: perex.cz; dkim=none (message not signed) header.d=none; Received: from snotra.am.freescale.net (192.88.168.50) by CY1PR03MB1485.namprd03.prod.outlook.com (0.163.17.158) with Microsoft SMTP Server (TLS) id 15.1.136.25; Wed, 15 Apr 2015 23:16:59 +0000 From: Scott Wood To: Jaroslav Kysela , Takashi Iwai Date: Wed, 15 Apr 2015 18:16:47 -0500 Message-ID: <1429139807-7059-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 X-Originating-IP: [192.88.168.50] X-ClientProxiedBy: BY2PR06CA032.namprd06.prod.outlook.com (10.141.250.150) To CY1PR03MB1485.namprd03.prod.outlook.com (25.163.17.158) X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1485; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1472; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(50986999)(19580395003)(19580405001)(46102003)(77156002)(62966003)(48376002)(50466002)(66066001)(47776003)(50226001)(33646002)(36756003)(86362001)(87976001)(4001410100001)(92566002)(40100003)(229853001)(122386002)(42186005)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR03MB1485; H:snotra.am.freescale.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:CY1PR03MB1485; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1485; X-Forefront-PRVS: 0547116B72 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2015 23:16:59.8197 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1485 X-OriginatorOrg: freescale.com Cc: Scott Wood , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP DEVICE_ALI previously would jump to port_inited after calling pci_iomap(), bypassing the check for bmaddr being NULL. Signed-off-by: Scott Wood --- sound/pci/intel8x0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 2c5484e..dfb77a5 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -3101,13 +3101,13 @@ static int snd_intel8x0_create(struct snd_card *card, chip->bmaddr = pci_iomap(pci, 3, 0); else chip->bmaddr = pci_iomap(pci, 1, 0); + + port_inited: if (!chip->bmaddr) { dev_err(card->dev, "Controller space ioremap problem\n"); snd_intel8x0_free(chip); return -EIO; } - - port_inited: chip->bdbars_count = bdbars[device_type]; /* initialize offsets */