Page MenuHomeFreeBSD

Fix errneous checks for OF_finddevice(9) return value
ClosedPublic

Authored by gonzo on Mar 10 2018, 11:47 PM.

Details

Summary

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

This patch fixes all instances of such erroneous checks.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gonzo created this revision.Mar 10 2018, 11:47 PM
nwhitehorn accepted this revision.Mar 11 2018, 12:04 AM

Looks good. Thanks for doing this!

This revision is now accepted and ready to land.Mar 11 2018, 12:04 AM
This revision was automatically updated to reflect the committed changes.