[PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

Dan Carpenter dan.carpenter at oracle.com
Fri Jul 14 12:05:12 UTC 2017


Changing:

- if (!frob()) {
+ if (frob() == 0) {

is a totally pointless change.  They're both bad, because they're doing
success testing instead of failure testing, but probably the second one
is slightly worse.

This warning seems dumb.  I can't imagine it has even a 10% success rate
at finding real bugs.  Just disable it.

Changing the code to propagate error codes, is the right thing of course
so long as it doesn't introduce bugs.

regards,
dan carpenter



More information about the dri-devel mailing list