[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070824140531.ff7d66bf.sfr@canb.auug.org.au>
Date: Fri, 24 Aug 2007 14:05:31 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Olof Johansson <olof@...om.net>
Cc: jgarzik@...ox.com, netdev@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: [PATCH v2] [02/10] pasemi_mac: Stop using the pci config space
accessors for register read/writes
On Thu, 23 Aug 2007 13:13:10 -0500 Olof Johansson <olof@...om.net> wrote:
>
> out:
> - pci_dev_put(mac->iob_pdev);
> -out_put_dma_pdev:
> - pci_dev_put(mac->dma_pdev);
> -out_free_netdev:
> + if (mac->iob_pdev)
> + pci_dev_put(mac->iob_pdev);
> + if (mac->dma_pdev)
> + pci_dev_put(mac->dma_pdev);
It is not documented as such (as far as I can see), but pci_dev_put is
safe to call with NULL. And there are other places in the kernel that
explicitly use that fact.
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists