Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Sergio Luis <sergio@...>
Cc: Achim Leubner <achim_leubner@...>, <linux-scsi@...>, LKML <linux-kernel@...>
Date: Tuesday, February 12, 2008 - 12:22 pm

On Tue, 2008-02-12 at 11:31 -0300, Sergio Luis wrote:

This can't be correct without a matching put in the error leg.

The difference between the two APIs is that pci_get_device returns a
pci_device with a reference taken and pci_find_device doesn't.  However,
pci_get_device does drop the reference again so as long as you never
exit the loop until it returns NULL, it is OK ... it's the exits before
pci_get_device() returns NULL that need the put.

James


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/g..., James Bottomley, (Tue Feb 12, 12:22 pm)