No need of explicit check around pci_dev_put,
It handles with NULL pointer itself.
Signed-off-by: Maninder Singh <[email protected]>
Reviewed-by: Akhilesh Kumar <[email protected]>
---
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