* Re: rcpci45 dereference fix.
2004-04-16 21:23 rcpci45 dereference fix Dave Jones
@ 2004-04-16 20:45 ` Francois Romieu
2004-04-16 21:50 ` Dave Jones
0 siblings, 1 reply; 4+ messages in thread
From: Francois Romieu @ 2004-04-16 20:45 UTC (permalink / raw)
To: Dave Jones, jgarzik, Linux Kernel
Dave Jones <davej@redhat.com> :
> --- linux-2.6.5/drivers/net/rcpci45.c~ 2004-04-16 22:22:22.000000000 +0100
> +++ linux-2.6.5/drivers/net/rcpci45.c 2004-04-16 22:23:01.000000000 +0100
> @@ -129,13 +129,14 @@
> rcpci45_remove_one (struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata (pdev);
> - PDPA pDpa = dev->priv;
> + PDPA pDpa;
>
> if (!dev) {
> printk (KERN_ERR "%s: remove non-existent device\n",
> dev->name);
> return;
> }
> + pDpa = dev->priv;
>
> RCResetIOP (dev);
> unregister_netdev (dev);
rcpci45_init_one() must succeed in order for rcpci45_remove_one() to be
issued.
If rcpci45_init_one() succeeds, dev can not be NULL.
So I'd rather see the "if (!dev) {" test removed instead of this change.
--
Ueimor
^ permalink raw reply [flat|nested] 4+ messages in thread
* rcpci45 dereference fix.
@ 2004-04-16 21:23 Dave Jones
2004-04-16 20:45 ` Francois Romieu
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2004-04-16 21:23 UTC (permalink / raw)
To: jgarzik; +Cc: Linux Kernel
--- linux-2.6.5/drivers/net/rcpci45.c~ 2004-04-16 22:22:22.000000000 +0100
+++ linux-2.6.5/drivers/net/rcpci45.c 2004-04-16 22:23:01.000000000 +0100
@@ -129,13 +129,14 @@
rcpci45_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
- PDPA pDpa = dev->priv;
+ PDPA pDpa;
if (!dev) {
printk (KERN_ERR "%s: remove non-existent device\n",
dev->name);
return;
}
+ pDpa = dev->priv;
RCResetIOP (dev);
unregister_netdev (dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rcpci45 dereference fix.
2004-04-16 20:45 ` Francois Romieu
@ 2004-04-16 21:50 ` Dave Jones
2004-04-19 16:40 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2004-04-16 21:50 UTC (permalink / raw)
To: Francois Romieu; +Cc: jgarzik, Linux Kernel
On Fri, Apr 16, 2004 at 10:45:06PM +0200, Francois Romieu wrote:
> rcpci45_init_one() must succeed in order for rcpci45_remove_one() to be
> issued.
>
> If rcpci45_init_one() succeeds, dev can not be NULL.
>
> So I'd rather see the "if (!dev) {" test removed instead of this change.
Sure.
Dave
--- drivers/net/rcpci45.c~ 2004-04-16 22:22:22.000000000 +0100
+++ drivers/net/rcpci45.c 2004-04-16 22:49:54.000000000 +0100
@@ -131,12 +131,6 @@
struct net_device *dev = pci_get_drvdata (pdev);
PDPA pDpa = dev->priv;
- if (!dev) {
- printk (KERN_ERR "%s: remove non-existent device\n",
- dev->name);
- return;
- }
-
RCResetIOP (dev);
unregister_netdev (dev);
free_irq (dev->irq, dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rcpci45 dereference fix.
2004-04-16 21:50 ` Dave Jones
@ 2004-04-19 16:40 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-04-19 16:40 UTC (permalink / raw)
To: Dave Jones; +Cc: Francois Romieu, Linux Kernel
Dave Jones wrote:
> On Fri, Apr 16, 2004 at 10:45:06PM +0200, Francois Romieu wrote:
>
> > rcpci45_init_one() must succeed in order for rcpci45_remove_one() to be
> > issued.
> >
> > If rcpci45_init_one() succeeds, dev can not be NULL.
> >
> > So I'd rather see the "if (!dev) {" test removed instead of this change.
>
> Sure.
>
> Dave
>
> --- drivers/net/rcpci45.c~ 2004-04-16 22:22:22.000000000 +0100
> +++ drivers/net/rcpci45.c 2004-04-16 22:49:54.000000000 +0100
> @@ -131,12 +131,6 @@
> struct net_device *dev = pci_get_drvdata (pdev);
> PDPA pDpa = dev->priv;
>
> - if (!dev) {
> - printk (KERN_ERR "%s: remove non-existent device\n",
> - dev->name);
> - return;
> - }
> -
Manually applied, since it's not in standard "patch -sp1" format.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-19 16:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 21:23 rcpci45 dereference fix Dave Jones
2004-04-16 20:45 ` Francois Romieu
2004-04-16 21:50 ` Dave Jones
2004-04-19 16:40 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox