Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3104601ybi; Sun, 2 Jun 2019 07:32:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzr4RVNt2Fw/Vg51D28aM7pitCSSKS/wXMmFCW8zTV931Kj9e7DpzP3R2MOLbrChyr0Bex2 X-Received: by 2002:a63:fa16:: with SMTP id y22mr22344364pgh.15.1559485955264; Sun, 02 Jun 2019 07:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559485955; cv=none; d=google.com; s=arc-20160816; b=BZ/My1TRUq8MRIeN0urujvoBPPXwtL0hiwqGhjR8ZEnFMR17GoapZ9vqzTMd945vFC NTz8QX9R981aUeL1VJM1nv/ALt7Av1cO6Je24aAntpxjiwMe614bmHVZdQnyMRhJOnin 31JJ0b22lBxItrzVumCisnl3XBy2YmT+nyCoNoL3idLLymLWb/0jQ/Q00XwjcgJa78oP tZtQ1Y+GyFYe8XvnH9WzUfoKs/eUoiJwFHKytBpdfWtWvt/54qGz+CHMfxqxYX03tU+U xHTusMI05pLs7fuZmpfZ9zEC5fSYKSWc6YlnEo3WeRdaFoQdM6RGBpPgrKxEbD3q3149 IcSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=lST+j8LPF+mnG5nlGg6apJU8aLFby39eS3di2S2h/Hs=; b=ZYRv2iFvr+KxwFkPoqM6+fLLZ0K7Qp4zXt+/zsqT2kFP04rhE9ceUjAR/61hRF8lkC cexdz+09Ibno//vhZ3UMkhkD0FXiN4lByRG2pAyM0T+ADp2765TOgYsx5xkgx+0hmTBT Ch2ZGY7rQhK/HOOOoCo/2sLQ29h5qWXp0wyHG/qY42hhO41SmhTeQ55ZeQmO+JrhdGtb XrVUU5pQiQ3hCinKXdhIQxryN2aPN/DTXJoIFS9U8geWuDGRdaOUChnJbgz5Ep7hDOUo alXtcCZnDwixejdzmi7wXk9ZafFSN4To7RSLo6gLkF8wp0USSRr6eJTzR5P71tAWgk73 GPLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LMdB6L2L; 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=QUARANTINE 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 a5si15592130pff.97.2019.06.02.07.32.07; Sun, 02 Jun 2019 07:32:35 -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=@gmail.com header.s=20161025 header.b=LMdB6L2L; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbfFBOaV (ORCPT + 99 others); Sun, 2 Jun 2019 10:30:21 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39488 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbfFBOaV (ORCPT ); Sun, 2 Jun 2019 10:30:21 -0400 Received: by mail-wr1-f67.google.com with SMTP id x4so9579773wrt.6 for ; Sun, 02 Jun 2019 07:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=lST+j8LPF+mnG5nlGg6apJU8aLFby39eS3di2S2h/Hs=; b=LMdB6L2LC0UxLaCjwzR6knFhfBM1WAKhURQ0V6OMK4SGxYRfKJ77tQtxVa9rQSijhC F6WAibIJ/jCLAIgt2LOwI5aTsRaemCcyvhm2O0D9JWXDveiVB5E8zgvDqiZfeFRvKuKl nqufdOFn9DSESJJY+p1puW1Qs/GSRr/fhg5JnhS+eZRzDH7HPsHFr+/xeJBu4QG5a1Pm NG/YjvihR4Dqft5af73Er2PQIinP+tDxGw5Pf5AqQ1nO2hh4v+8bnwyNgKLv5lMK03mU IEfWibece566awAuflh5CGNkW36jR8OnwnmoZfBJrymfCi0cJKZFQRwZf/36jxcQgrs4 ERww== 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:reply-to :mime-version:content-transfer-encoding; bh=lST+j8LPF+mnG5nlGg6apJU8aLFby39eS3di2S2h/Hs=; b=Fb/qQX6XpthKGkgzazZ5/IZ79GBmJvkTMSuyJeudOLlcEaWV5ydTcbgGsys9AdAWZm t3JZzus/pZQ05ScSWRAu2pHra71ofI6K7C4fWc+fAa3sHdA3R41YOWKKd9+QGTUMKisa aZSJZ2IaSHuFDAZHAoOTFkln+y8QnVLb6R/M9VGNfBH2mr1i1vB5fsvp7nxn/0Bt7RN2 HXAyYFNoW3wc2OO61TdUjBDIroUc9AbnoFcD/jzkeHGUstY4OKHyuGvVY3o9UHnuqu+x P/rBPjmVJzNNyfbMAUlzLqCQvC2RwXCnLMm2yUNGG0Xzk5zNzLuSIBw1FQbopijiycmQ ed3A== X-Gm-Message-State: APjAAAV6lHEodUy9vziJnEF/OTwXn4658hL7HSJRDKCm5HVtemd+YEwj iCSNhQZmWydWsEJmsyUkk8DeF+i6SJo= X-Received: by 2002:adf:f804:: with SMTP id s4mr12949116wrp.136.1559485819413; Sun, 02 Jun 2019 07:30:19 -0700 (PDT) Received: from p200300EEEE2F.fritz.box (p200300C98712670014A3D3D52C57F0B4.dip0.t-ipconnect.de. [2003:c9:8712:6700:14a3:d3d5:2c57:f0b4]) by smtp.gmail.com with ESMTPSA id y9sm1084508wma.1.2019.06.02.07.30.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 02 Jun 2019 07:30:18 -0700 (PDT) From: Emanuel Bennici To: linux-kernel@vger.kernel.org Cc: Bjorn Helgaas , Joe Perches , Andy Shevchenko , Lukas Wunner , Tyrel Datwyler , Sebastian Ott Subject: [PATCH] pci: ibmphp: add check of return value from pci_hp_register() Date: Sun, 2 Jun 2019 16:30:12 +0200 Message-Id: <20190602143017.19645-1-benniciemanuel78@gmail.com> X-Mailer: git-send-email 2.19.1 Reply-To: benniciemanuel78@gmail.com MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Check the return value of pci_hp_register() in Function ebda_rsrc_controller() Signed-off-by: Emanuel Bennici --- drivers/pci/hotplug/ibmphp_ebda.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c index 11a2661dc062..7e523ce071b3 100644 --- a/drivers/pci/hotplug/ibmphp_ebda.c +++ b/drivers/pci/hotplug/ibmphp_ebda.c @@ -896,10 +896,17 @@ static int __init ebda_rsrc_controller(void) } /* each hpc */ + int result = 0; list_for_each_entry(tmp_slot, &ibmphp_slot_head, ibm_slot_list) { snprintf(name, SLOT_NAME_SIZE, "%s", create_file_name(tmp_slot)); - pci_hp_register(&tmp_slot->hotplug_slot, - pci_find_bus(0, tmp_slot->bus), tmp_slot->device, name); + result = pci_hp_register(&tmp_slot->hotplug_slot, + pci_find_bus(0, tmp_slot->bus), + tmp_slot->device, name); + + if (result) { + err("pci_hp_register failed with error %d\n", result); + goto error; + } } print_ebda_hpc(); -- 2.19.1