lkml.org 
[lkml]   [2008]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] [PATCH] ne.c fix rmmod, platform driver improvements
From
On Sat, 13 Sep 2008 10:19:06 -0500, David Fries <david@fries.net> wrote:
> > For now rbtx49xx ne platform devices use -1 for pdev->id, but it may
> > change. Please don't assume it.
>
> Does this work?
> - if (0 <= this_dev && this_dev < MAX_NE_CARDS) {
> + if (!res) {

It should work (not tested: I have no access to the board few days),
but if someone defined ne platform device with pdev->id == -1 and he
forgot to declare IO resources, but things happen. Checking this_dev
range before accessing io[] array would be better.

---
Atsushi Nemoto

\
 
 \ /
  Last update: 2008-09-13 17:31    [from the cache]
©2003-2011 Jasper Spaans