lkml.org 
[lkml]   [2006]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] pci: gt96100eth use pci probing
Jeff Garzik napsal(a):
> Jiri Slaby wrote:
>>>> +unprobe:
>>>> + for (j = i; j > 0; j--) {
>>>> + struct gt96100_if_t *gtif = &gtifs[j - 1];
>>>> + gt96100_remove1(gtif);
>>>> + }
>>>> + kfree(gtifs);
>>> upon failure, you fail to set drvdata back to NULL
>> What is the purpose of setting this to NULL, other drivers don't do
>> that too?
>
> A simple grep(1) shows well over 300 cases that do this.
But also shows the latter case: some of them do not have pci_dev_setdrv([^,]*,
NULL) -- it finds only one occurence of that function (that set the value).
>
> And it's just logical: don't leave a pointer hanging around, after it
> has been kfree'd.
Seems logical. Will do it.

thanks,
--
Jiri Slaby www.fi.muni.cz/~xslaby
\_.-^-._ jirislaby@gmail.com _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-25 12:34    [W:3.275 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site