On Wed, Jul 23, 2008 at 04:06:47PM -0700, David Brownell wrote:
> I happened across this ... it looks like the root cause
> is that an i2c driver ("smbus_alert") gets registered
> before the class ("i2c_adapter") being iterated.
>
> (This used the latest version of the patch adding SMBus
> alert support to I2C. It's not mainline, although it's
> been posted a few times.)
>
>
> Now, obviously a trivial fix is to change that init order,
> and just accept that there's now an init dependency which
> didn't exist before. But on the other hand I don't think
> that it's reasonable to oops there; it's needless, and in
> fact it never oopsed before!
>
> In this case adding
>
> if (!class->p)
> return -EINVAL;
>
> at the top of class_for_each_device() would prevent such
> oopses from ever happening.
Makes sense, care to send a real patch for this?
thanks,
greg k-h
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c