Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbbFYKwn (ORCPT ); Thu, 25 Jun 2015 06:52:43 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:53577 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbbFYKwi (ORCPT ); Thu, 25 Jun 2015 06:52:38 -0400 X-AuditID: cbfee68d-f79106d00000728c-a7-558bdd74f17b From: Maninder Singh To: abbotti@mev.co.uk, hsweeten@visionengravers.com, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] staging/comedi: remove unnecessary check around pci_dev_put Date: Thu, 25 Jun 2015 16:20:26 +0530 Message-id: <1435229426-39366-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsWyRsSkRrfkbneowdyl3BbHv51nt9hz5he7 RfPi9WwWc+d8Z7e4vGsOm8Xh+W0sFvfebGVyYPe4t+8wi8f+uWvYPd71NbJ49G1ZxejxeZOc x/MzP9gC2KK4bFJSczLLUov07RK4Mo682spSsJOtYtfsz4wNjMdYuxg5OSQETCSmHbvFBGGL SVy4t56ti5GLQ0hgKaPEg9c/mWGKLr3ZywyRWMQo8f7EBBYI5yejxI0zJ8Cq2AT0JFbt2gOW EBHoZZT4dO4kkMPBwSzgJDH9qx5IjbBAgMTPGVeZQcIsAqoS69dbgYR5BdwlPk99ww4SlhBQ kJgzyQZkioRAM7vE4SWTWUBqWAQEJL5NPsQCUSMrsekA1G2SEgdX3GCZwCi4gJFhFaNoakFy QXFSepGhXnFibnFpXrpecn7uJkZg+J7+96x3B+PtA9aHGAU4GJV4eBUudocKsSaWFVfmHmI0 BdowkVlKNDkfGCV5JfGGxmZGFqYmpsZG5pZmSuK8ilI/g4UE0hNLUrNTUwt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AgAA 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: 1044 Lines: 31 pci_dev_put cehcks for NULL pointer itself, reported by coccinelle Signed-off-by: Maninder Singh Reviewed-by: Yogesh Gaur --- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index fb3043d..19b5806 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -1717,8 +1717,7 @@ static void pci9118_detach(struct comedi_device *dev) pci9118_reset(dev); comedi_pci_detach(dev); pci9118_free_dma(dev); - if (pcidev) - pci_dev_put(pcidev); + pci_dev_put(pcidev); } static struct comedi_driver adl_pci9118_driver = { -- 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/