Re: [PATCH 1/2] [PATCH] ne.c fix rmmod, platform driver improvements
From: Atsushi Nemoto <hidden>
Date: 2008-09-13 15:29:11
Also in:
lkml
From: Atsushi Nemoto <hidden>
Date: 2008-09-13 15:29:11
Also in:
lkml
On Sat, 13 Sep 2008 10:19:06 -0500, David Fries [off-list ref] wrote:
quoted
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