Source-Changes archive

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

CVS commit: src/sys/dev/i2c



Module Name:    src
Committed By:   brad
Date:           Thu Jan 23 19:05:51 UTC 2025

Modified Files:
        src/sys/dev/i2c: i2c.c

Log Message:
Fix a likely bug in iic_ioctl.

The error variable was being over written by the copyout call.  The
effect here is that the I2C transaction could have errored, but then
the copyout is performed in the read case and if that worked, error
would end up 0.  Just don't do the copyout if the I2C transaction
errored.

Also, don't return twice.  Once is enough.

With this, "i2cscan -r ..." on a RPI and with the ds28e17iic(4)
masters will work as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/i2c/i2c.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index