Re: [PATCH] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 01, 2008 at 09:11:09PM +0100, Julia Lawall wrote:
> On Mon, 1 Dec 2008, Olof Johansson wrote:
> 
> > On Mon, Dec 01, 2008 at 06:39:01PM +0100, Julia Lawall wrote:
> > > On Mon, 1 Dec 2008, Olof Johansson wrote:
> > > 
> > > > On Thu, Nov 27, 2008 at 01:19:49PM +0100, Julia Lawall wrote:
> > > > > From: Julia Lawall <julia@xxxxxxx>
> > > > > 
> > > > > pci_get_device increments a reference count that should be decremented
> > > > > using pci_dev_put.  I have thus added an extra label in the error handling
> > > > > code to do this.  I don't know, however, whether there should be a
> > > > > pci_dev_put before the return 0 as well.
> > > > > 
> > > > [...]
> > > > 
> > > > > Signed-off-by: Julia Lawall <julia@xxxxxxx>
> > > > 
> > > > Acked-by: Olof Johansson <olof@xxxxxxxxx>
> > > 
> > > Do you know the answer about the return 0?
> > 
> > Teaches me to read the patch description twice.
> > 
> > Either there or in pasemi_nand_remove(), doesn't matter much to me. Doing
> > it before the return 0 is the smaller change.
> 
> Actually, could pci_dev_put(pdev) be placed right after:
> 
> lpcctl = pci_resource_start(pdev, 0);
> 
> Then there would only be one, and the rest of the code could go back to 
> its original form.

Yep, even easier.

Thanks for catching this.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux