Received: by 10.223.164.202 with SMTP id h10csp1506323wrb; Wed, 15 Nov 2017 22:29:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMYVroSSVYr4i1HL3F9d1KcjFsxaTwR5V6z0iFeHh5JLZifa9C/O+XEhrcfXbqIfCg3hlNqk X-Received: by 10.98.202.74 with SMTP id n71mr732109pfg.202.1510813762347; Wed, 15 Nov 2017 22:29:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510813762; cv=none; d=google.com; s=arc-20160816; b=k9/qxL7vCXD/mx6dQt8R5DmtbuWm/CJjg8ZZwFy4qBOTyNMkBDG1WYEE1BDuJOJtgE OTr1eAlFk2aVHKWXSVPI93XoIebC3TmIL+D0JS88iwu16piTpJa0S8PTPJLmlp8rEdRz 1eojkAn5iSA4FUdkQJQFtb/LyjiKjOwjkgqGypLRNkpB6VGhuy2vppDcqLWeuEmXWiik WiB+oGo0aq5FsU+ttdvJ5PFNWGM3hrV4hSIi0zmbTuOkkJvTSVo7cT6DJ16PZiZXqid7 8kMajeh/cxZfqtG17z4J7JOKQZw5k0JX7FZSyGfWkA/znF2St5O+h5KuzWj1FeGSKNL3 ba0A== 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=YQ1OLXoxUZ2TM1JkgqvBqDQV1croUbRYwaVqSOQUcg8=; b=DWeRonsLak56oeCyHgA/VtYyTmfUwpXB5pKDPw0aoWCKYAZe1eXhh7fEWgmMcGRTov qCa1/+LGIkFRScnEwIx/VL/zgXJ3fHzzwz1VZ026X6XVaZAUbE2hcx0xGg+BTHOsyBUM 4ZrMrPWnS4UKqvq9C0rLGt2uRTzI7cumi75g5MV1sk5BPSn6LKatVDXRtTQYYs2nfkLl RoEq2qfSg7Ef1NxY1C/cfoVmiWhUh3PypRmUfYz1i6phAcCUrbabVaYELy26U/+SI8Fi u9vsN2Lb8jWHNrK4krCVN9ojfXRBsfM7FTQYpDVHpWLxrC3ZNMcBN+AtsmjR/qBwnoJD 6nQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FDYYBmRM; 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 c15si381240pfm.128.2017.11.15.22.29.10; Wed, 15 Nov 2017 22:29:22 -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=FDYYBmRM; 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 S932813AbdKPEdP (ORCPT + 89 others); Wed, 15 Nov 2017 23:33:15 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44879 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758706AbdKPE3L (ORCPT ); Wed, 15 Nov 2017 23:29:11 -0500 Received: by mail-pg0-f67.google.com with SMTP id 4so10791300pge.1; Wed, 15 Nov 2017 20:29:10 -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=YQ1OLXoxUZ2TM1JkgqvBqDQV1croUbRYwaVqSOQUcg8=; b=FDYYBmRMpEWgMY1XHsWvHOjlts+nrLrOAF69JQ8veQNwRoTafV3PnW0olrhb+N9IEA x/B68bsaK395mrBE9GLsS9DEbFF2cHn2T5luMcDpbAy7KLChBNsWS6UHZaYxUtqGmq7R 5UrZkm/gL3MgsRjdiVSQJFQC/G8bDxNl95tKoUNHXoYETF2knlusrOTQozt+71faJscU lJi+RndbQvfbJNY2JL0OGDa0Ydr8OH7hddfG2H8FFnk3esamSUCdDdJeAkZg65QAXgk8 8UBpo7pj/KlxF051FvbNnBWUO7mHFdkZb+aZ4rG8edqFU3IzNalyJb58I/5is3xBOn0v WqJA== 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=YQ1OLXoxUZ2TM1JkgqvBqDQV1croUbRYwaVqSOQUcg8=; b=sATUa+nCXILKBLUp4q2RuNo9+iELH1B34Uoboa4O9a7J07YQjCdGgWP3BDK9N8rMkq byaJj++qOZhgd+hwRUOdX/zYwHQ2H2vUEgiRhniJ+Y4UstzHSGhXXpLo2eIdEoSO0Vz4 TtDOCCaBiRBbpX3XEeuY2dxZdaCICzUvWoP5lY4TOtuV6wlJF4+xMX7D7bDISG0GQ9Ps 4seCOnCG5hWQ2wbDvserzFbWZNuSlZLXJcq/3Pw/C7ot1U/jk054kBlnBrGqnJ9Gpvlg yqxsbfIhTXBs2Yj22lG+/H3wOiB1B2aj8etzoQ8YOUCZtGOiHrw5dhizw+Phyg2AQT25 x+Gg== X-Gm-Message-State: AJaThX7Qk8+5bvgZIi48XluRWlFgHOJ65lPFPl4pxXFDYFW/jeWcYTMl 1A3eT3+hz+sn4ZShkbwvGfc= X-Received: by 10.98.97.1 with SMTP id v1mr440164pfb.105.1510806550543; Wed, 15 Nov 2017 20:29:10 -0800 (PST) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id m69sm421965pfc.27.2017.11.15.20.29.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 20:29:09 -0800 (PST) From: Arvind Yadav To: isdn@linux-pingi.de, davem@davemloft.net, stephen@networkplumber.org, johannes.berg@intel.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 07/12] isdn: hisax: Handle return value of pnp_irq and pnp_port_start Date: Thu, 16 Nov 2017 09:57:24 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pnp_irq() and pnp_port_start() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/isdn/hisax/hisax_fcpcipnp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index e4f7573..7a7137d 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c @@ -940,6 +940,8 @@ static int fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) } adapter->io = pnp_port_start(pdev, 0); adapter->irq = pnp_irq(pdev, 0); + if (!adapter->io || adapter->irq == -1) + goto err_free; printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at IO %#x irq %d\n", (char *) dev_id->driver_data, adapter->io, adapter->irq); -- 1.9.1 From 1584196202073191743@xxx Thu Nov 16 04:40:30 +0000 2017 X-GM-THRID: 1584196202073191743 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread