re: iio: light: new driver for the ROHM BH1780

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

 



Hello Linus Walleij,

This is a semi-automatic email about new static checker warnings.

The patch 1f0477f18306: "iio: light: new driver for the ROHM BH1780" 
from Apr 11, 2016, leads to the following Smatch complaint:

drivers/iio/light/bh1780.c:93 bh1780_debugfs_reg_access()
	 error: we previously assumed 'readval' could be null (see line 86)

drivers/iio/light/bh1780.c
    85	
    86		if (!readval)
                    ^^^^^^^^
    87			bh1780_write(bh1780, (u8)reg, (u8)writeval);

Should this be:
			return bh1780_write(bh1780, (u8)reg, (u8)writeval);

    88	
    89		ret = bh1780_read(bh1780, (u8)reg);
    90		if (ret < 0)
    91			return ret;
    92	
    93		*readval = ret;
                ^^^^^^^^
    94	
    95		return 0;

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux