[PATCH] fix OF_finddevice return value checks on sparc64

Jayachandran C. jchandra at freebsd.org
Fri Dec 2 15:36:43 UTC 2011


On Fri, Dec 2, 2011 at 7:05 PM, Jayachandran C. <jchandra at freebsd.org> wrote:
> While going thru the OF_finddevice usage in kernel (to fix up the FDT
> interface) I noticed that  a few calls made to OF_finddevice in
> sparc64 does not check the return value correctly.
>
> The error return is -1 not 0, and since the value is unsigned,
> checking it for '< 0' does not work either.  The attached patch fixes
> this.

I had not planned to commit this yet, but it has gone in with the
related changes in r228201.  Let me know if there are any objections -
I can revert or check in further changes if needed.

Thanks,
JC.


More information about the freebsd-sparc64 mailing list