Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1172036 > unrolled thread

[PATCH 1/1] char/agp: remove checks around pci_dev_put

Started byManinder Singh <maninder1.s@samsung.com>
First post2015-06-25 12:10 +0200
Last post2015-06-25 12:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] char/agp: remove checks around pci_dev_put Maninder Singh <maninder1.s@samsung.com> - 2015-06-25 12:10 +0200

#1172036 — [PATCH 1/1] char/agp: remove checks around pci_dev_put

FromManinder Singh <maninder1.s@samsung.com>
Date2015-06-25 12:10 +0200
Subject[PATCH 1/1] char/agp: remove checks around pci_dev_put
Message-ID<pFcgA-5Bx-93@gated-at.bofh.it>
No need of explicit check around pci_dev_put,
It handles with NULL pointer itself.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
---
 drivers/char/agp/intel-gtt.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 0b4188b..78d35fa 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1430,10 +1430,8 @@ void intel_gmch_remove(void)
 	if (--intel_private.refcount)
 		return;
 
-	if (intel_private.pcidev)
-		pci_dev_put(intel_private.pcidev);
-	if (intel_private.bridge_dev)
-		pci_dev_put(intel_private.bridge_dev);
+	pci_dev_put(intel_private.pcidev);
+	pci_dev_put(intel_private.bridge_dev);
 	intel_private.driver = NULL;
 }
 EXPORT_SYMBOL(intel_gmch_remove);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web