HomeFreeBSD

[ofw] fix errneous checks for OF_finddevice(9) return value

Description

[ofw] fix errneous checks for OF_finddevice(9) return value

OF_finddevices returns ((phandle_t)-1) in case of failure. Some code
in existing drivers checked return value to be equal to 0 or
less/equal to 0 which is also wrong because phandle_t is unsigned
type. Most of these checks were for negative cases that were never
triggered so trhere was no impact on functionality.

Reviewed by: nwhitehorn
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D14645

Details

Provenance
gonzoAuthored on
Reviewer
nwhitehorn
Differential Revision
D14645: Fix errneous checks for OF_finddevice(9) return value
Parents
rS331228: Update mpr(4) driver from v15 to v18 from Broadcom site.
Branches
Unknown
Tags
Unknown