drivers/staging/media/ipu3/ipu3-css.c:1831: bad compare ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

drivers/staging/media/ipu3/ipu3-css.c:1831:30: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Source code is
        css->pipes[pipe].bindex =
                ipu3_css_find_binary(css, pipe, q, r);
        if (css->pipes[pipe].bindex < 0) {
                dev_err(css->dev, "failed to find suitable binary\n");
                return -EINVAL;
        }

Suggest sanity check return value from function first, then if it is ok,
assign it to an unsigned variable.

Regards

David Binderman



_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux