From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933305AbdEXCh2 (ORCPT ); Tue, 23 May 2017 22:37:28 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:26468 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbdEXCh0 (ORCPT ); Tue, 23 May 2017 22:37:26 -0400 To: Johannes Thumshirn Cc: "Martin K . Petersen" , Linux SCSI Mailinglist , Linux Kernel Mailinglist , qla2xxx-upstream@qlogic.com, himanshu.madhani@cavium.com Subject: Re: [PATCH] qla2xxx: don't disable a not previously enabled PCI device From: "Martin K. Petersen" Organization: Oracle Corporation References: <20170523145047.5020-1-jthumshirn@suse.de> Date: Tue, 23 May 2017 22:37:10 -0400 In-Reply-To: <20170523145047.5020-1-jthumshirn@suse.de> (Johannes Thumshirn's message of "Tue, 23 May 2017 16:50:47 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes, > When pci_enable_device() or pci_enable_device_mem() fail in > qla2x00_probe_one() we bail out but do a call to > pci_disable_device(). This causes the dev_WARN_ON() in > pci_disable_device() to trigger, as the device wasn't enabled > previously. > > So instead of taking the 'probe_out' error path we can directly return > *iff* one of the pci_enable_device() calls fails. > > Additionally rename the 'probe_out' goto label's name to the more > descriptive 'disable_device'. > > Signed-off-by: Johannes Thumshirn > Fixes: e315cd28b9ef ("[SCSI] qla2xxx: Code changes for qla data structure refactoring") Himanshu/Quinn: Please review! -- Martin K. Petersen Oracle Linux Engineering