From patchwork Wed Oct 11 08:44:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 115523 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp390011edb; Wed, 11 Oct 2017 01:45:18 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBRHPZMLHpw+1mhKAJU9+jTEkRXuTfU568WIGmg6MU36p7GNo29j033BwukXlbq3iLT7521 X-Received: by 10.98.7.82 with SMTP id b79mr4431241pfd.289.1507711518678; Wed, 11 Oct 2017 01:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507711518; cv=none; d=google.com; s=arc-20160816; b=OKdCJsRb8fBhlnAgHpaudYoh/ZvqaBGQLLRpxmCJpeg98xEegjx4+lf/h1gMYY9zd6 3uX4Nb7DOd38yJqFbdP/kRNbTu/IWE40ohECNsjc0zawFw8nxxUoWMz5CgvmZdiJijPP ZOlqD83BEOareBRvZbsBz/xiQ31wSYlMnzbUYIMHSnwQ3aBwyZaAWe6auUbNOY2j1Hhx rerutFK5L41yD4r6m03a5AshvwgKJusELU+dHljVtqcd+sZlp8ZG1OwSZTP5UsZwAduF iLEaYoi1qoD5tCwYJ6TrhoC3rW2nid+KMReStZZxRy6svo0Idit3P1tQgLDHhLZphlgY t5jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Y5xaAQEm1qhCcMJ2zp465d7xcDrzQO+DDr05AnO5qjE=; b=VQjXZHkFKGGk67bBO2+UVd59Bhv62X0lKW/dyCYxScV9ps2VraiZ+t3+BgkeY5q4U9 p79G6bYx8JEzJVqqoTF6I9FJMGMdoffxVglUOHCk8FG4U6Ls32vsn4PiEHTjhqStYQYI I/4ttzoh2JP6lNAOpXMQJ1um7uUvAhaThJkqIWGU6cNHud2NFGVE3a/v6R6/ghYKokij 7S2Re+HlqYNEsWMMYxAmwFd2I9gYhab33E2Q6Pv1cCfgS6uDCPK1mGh2LgVhvFzJ7BGp mnxm9UvgSlIcopQNbHzvG+VNvYBVgyDP6PwaHHTihNythi+yoUR7u0HY2umV+qOuXbMX 24JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V1+nwcr8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y69si123717pfb.303.2017.10.11.01.45.18; Wed, 11 Oct 2017 01:45:18 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=V1+nwcr8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757316AbdJKIpP (ORCPT + 26 others); Wed, 11 Oct 2017 04:45:15 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:14420 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756774AbdJKIow (ORCPT ); Wed, 11 Oct 2017 04:44:52 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9B8im2n011180; Wed, 11 Oct 2017 03:44:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507711488; bh=mtndcPpg4InTr9/CibtyEBgwD00K960WFfof6Gtu4iY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=V1+nwcr89/pTAbriNts53rYfi7CkYLywIRkaqfruEU01HWSPOAw1c2BU8TpC09aeg OQQLHxRqFz1LEZ1MuywWtRvSr2PJzj0ppW0xPvCjGhLvJ5Ao2y5SWeMK2bIGotNVCo khlsIXxwYDCY2MLeAK1lik+giMvjo66TMGhtFBmw= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9B8imBC005892; Wed, 11 Oct 2017 03:44:48 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 11 Oct 2017 03:44:48 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 11 Oct 2017 03:44:48 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9B8ih2q019232; Wed, 11 Oct 2017 03:44:46 -0500 From: Kishon Vijay Abraham I To: Arnd Bergmann , Greg Kroah-Hartman , Kishon Vijay Abraham I CC: , , , Subject: [PATCH 1/3] misc: pci_endpoint_test: Fix failure path return values in probe Date: Wed, 11 Oct 2017 14:14:36 +0530 Message-ID: <20171011084438.8296-2-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171011084438.8296-1-kishon@ti.com> References: <20171011084438.8296-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return value of pci_endpoint_test_probe is not set properly in a couple of failure cases. Fix it here. Signed-off-by: Kishon Vijay Abraham I --- drivers/misc/pci_endpoint_test.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index deb203026496..e787a63a321a 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -533,6 +533,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, test->base = test->bar[test_reg_bar]; if (!test->base) { + err = -ENOMEM; dev_err(dev, "Cannot perform PCI test without BAR%d\n", test_reg_bar); goto err_iounmap; @@ -542,6 +543,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL); if (id < 0) { + err = id; dev_err(dev, "unable to get id\n"); goto err_iounmap; }