Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751551AbbFYLQm (ORCPT ); Thu, 25 Jun 2015 07:16:42 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:43218 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752330AbbFYLQd (ORCPT ); Thu, 25 Jun 2015 07:16:33 -0400 X-AuditID: cbfee68e-f79c56d000006efb-88-558be3105e66 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 v2] staging/comedi: remove unnecessary check around pci_dev_put Date: Thu, 25 Jun 2015 16:44:31 +0530 Message-id: <1435230871-2722-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsWyRsSkSlfgcXeoQe9FOYvj386zW+w584vd onnxejaLuXO+s1tc3jWHzeLw/DYWi3tvtjI5sHvc23eYxWP/3DXsHu/6Glk8+rasYvT4vEnO 4/mZH2wBbFFcNimpOZllqUX6dglcGW3vpjIXPGCrOPC1j7mB8QlrFyMnh4SAicSWxy8ZIWwx iQv31rN1MXJxCAksZZS4er6BHaZo9pwVzBCJ6YwS//qvskI4Pxkllm+dwAZSxSagJ7Fq1x4W kISIQC+jxKdzJ4EcDg5mASeJ6V/1QGqEBfwlVn/YyAYSZhFQlTg1WR4kzCvgJrF403ewagkB BYk5k2xApkgItLNLzH0/Hew6FgEBiW+TD0HVyEpsOsAMcZukxMEVN1gmMAouYGRYxSiaWpBc UJyUXmSkV5yYW1yal66XnJ+7iREYvqf/PevbwXjzgPUhRgEORiUeXo0b3aFCrIllxZW5hxhN gTZMZJYSTc4HRkleSbyhsZmRhamJqbGRuaWZkjhvgtTPYCGB9MSS1OzU1ILUovii0pzU4kOM T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ter: 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: 1081 Lines: 33 pci_dev_put checks for NULL pointer itself, reported by coccinelle Signed-off-by: Maninder Singh Reviewed-by: Yogesh Gaur --- v2: changelog typo cehcks -> checks 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/