Author: kevlo
Date: Tue Nov 13 05:58:52 2012
New Revision: 242947
URL: http://svnweb.freebsd.org/changeset/base/242947

Log:
  Check the return value of uiomove(9).

Modified:
  head/sys/dev/iicbus/iic.c

Modified: head/sys/dev/iicbus/iic.c
==============================================================================
--- head/sys/dev/iicbus/iic.c   Tue Nov 13 03:56:50 2012        (r242946)
+++ head/sys/dev/iicbus/iic.c   Tue Nov 13 05:58:52 2012        (r242947)
@@ -221,7 +221,11 @@ iicwrite(struct cdev *dev, struct uio * 
        }
 
        count = min(uio->uio_resid, BUFSIZE);
-       uiomove(sc->sc_buffer, count, uio);
+       error = uiomove(sc->sc_buffer, count, uio);
+       if (error) {
+               IIC_UNLOCK(sc);
+               return (error);
+       }
 
        error = iicbus_block_write(device_get_parent(iicdev), sc->sc_addr,
                                        sc->sc_buffer, count, &sent);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to