Messages in this thread | | | Date | Sun, 14 Sep 2008 00:29:06 +0900 (JST) | Subject | Re: [PATCH 1/2] [PATCH] ne.c fix rmmod, platform driver improvements | From | Atsushi Nemoto <> |
| |
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
| |