Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753749AbbFYKH7 (ORCPT ); Thu, 25 Jun 2015 06:07:59 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41347 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753344AbbFYKEO (ORCPT ); Thu, 25 Jun 2015 06:04:14 -0400 X-AuditID: cbfee68d-f79106d00000728c-fd-558bd21ba815 From: Maninder Singh To: airlied@linux.ie, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] char/agp: remove checks around pci_dev_put Date: Thu, 25 Jun 2015 15:32:18 +0530 Message-id: <1435226538-47364-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBLMWRmVeSWpSXmKPExsWyRsSkVlf6UneowbR5Zha9504yWVzeNYfN 4vD8NhaLe2+2MjmweGz/9oDVo2/LKkaPz5vkApijuGxSUnMyy1KL9O0SuDKu3utiK/jFVtG9 +BpjA+Nf1i5GTg4JAROJYy1T2SBsMYkL99aD2UICSxkllu1Og6nZ1rqYpYuRCyi+iFHi7+GP 7BDOT0aJE/eeg3WwCehJrNq1hwXEFhEwknix8iFQnIODWcBJYvpXPZCwsIC9xJnl58AWswio Spx52wtm8wq4Szx4d4cVpFxCQEFiziQbkPESArfZJPq/bGaEqBeQ+Db5EAtEjazEpgPMELdJ ShxccYNlAqPgAkaGVYyiqQXJBcVJ6UWGesWJucWleel6yfm5mxiBAXj637PeHYy3D1gfYhTg YFTi4VW42B0qxJpYVlyZe4jRFGjDRGYp0eR8YJjnlcQbGpsZWZiamBobmVuaKYnzKkr9DBYS SE8sSc1OTS1ILYovKs1JLT7EyMTBKdXAuPblJrGjUgUT1+XkmrAw/2K+d6Te+U30D1bTo4kG JyJs/gT/+N19NLtLVOFAyia51f3iVud+6O7Qc7fc7cEieUY5/vIh4xe5kx9OEJGcdCondue+ KMUZLBXfYp7xML7jvvCyX6rC69M5529fHnTJPTp7i/Njk/2UNBvXe29SqydMcJJorc+tVWIp zkg01GIuKk4EACUaj5U7AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsVy+t9jAV3pS92hBlcP61v0njvJZHF51xw2 i8Pz21gs7r3ZyuTA4rH92wNWj74tqxg9Pm+SC2COamC0yUhNTEktUkjNS85PycxLt1XyDo53 jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAFap6RQlphTChQKSCwuVtK3wzQhNMRN1wKmMULX NyQIrsfIAA0krGHMuHqvi63gF1tF9+JrjA2Mf1m7GDk5JARMJLa1LmaBsMUkLtxbz9bFyMUh JLCIUeLv4Y/sEM5PRokT956zgVSxCehJrNq1B6xDRMBI4sXKh0BxDg5mASeJ6V/1QMLCAvYS Z5afA1vAIqAqceZtL5jNK+Au8eDdHVaQcgkBBYk5k2wmMHIvYGRYxSiaWpBcUJyUnmuoV5yY W1yal66XnJ+7iREc4M+kdjCubLA4xCjAwajEw7vzQHeoEGtiWXFl7iFGCQ5mJRHeroNAId6U xMqq1KL8+KLSnNTiQ4ymQMsnMkuJJucDoy+vJN7Q2MTc1NjU0sTCxMxSSZz3ZL5PqJBAemJJ anZqakFqEUwfEwenVAPjkY2Zp45w6ql8kHg2f8v+lqXBVf86m/YkfHziG3yw3Liiu3SPkqly ANNb0Q03eXZ8uq3u8P9+t9qK3Uy5Rfxz10hwfq6X4zf3+JZQKOSdbqSvEPTKb7v4tDViL6vs jt+Y+Tt3KQvL14th2w4k955bz6TzOztq2gHNMO7f9bV7maY7fk/fu6tPiaU4I9FQi7moOBEA vSzGIYYCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1106 Lines: 34 No need of explicit check around pci_dev_put, It handles with NULL pointer itself. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- 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/