From owner-svn-src-all@FreeBSD.ORG Tue Nov 13 05:58:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83C8B42A; Tue, 13 Nov 2012 05:58:52 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 697348FC0C; Tue, 13 Nov 2012 05:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD5wqQI093268; Tue, 13 Nov 2012 05:58:52 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD5wqOc093267; Tue, 13 Nov 2012 05:58:52 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201211130558.qAD5wqOc093267@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 Nov 2012 05:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242947 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 05:58:52 -0000 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);