From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 1/2] hpt366: fix PCI clock detection for HPT374 Date: Fri, 10 Aug 2007 19:41:59 +0400 Message-ID: <46BC8747.4020307@ru.mvista.com> References: <200708060006.35511.sshtylyov@ru.mvista.com> <20070806202958.25670cc1@the-village.bc.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from h155.mvista.com ([63.81.120.155]:55525 "EHLO imap.sh.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1759753AbXHJPjt (ORCPT ); Fri, 10 Aug 2007 11:39:49 -0400 In-Reply-To: <20070806202958.25670cc1@the-village.bc.nu> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Alan Cox Cc: bzolnier@gmail.com, rah@bash.sh, linux-ide@vger.kernel.org Alan Cox wrote: >>+ if (chip_type == HPT374 && (PCI_FUNC(dev->devfn) & 1)) { >>+ struct pci_dev *dev1 = pci_get_slot(dev->bus, >>+ dev->devfn - 1); > Can be NULL Not really. This may not be called if it's NULL -- see hpt374_init_setup(). Maybe worth a comment though... >>+ unsigned long io_base = pci_resource_start(dev1, 4); > Kaboom That was a dud bomb. ;-) MBR, Sergei