Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Nov 2006 06:02:28 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 110365 for review
Message-ID:  <200611220602.kAM62SPn056159@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110365

Change 110365 by imp@imp_lighthouse on 2006/11/22 06:02:23

	Remove debug in diff reduction against -current.

Affected files ...

.. //depot/projects/arm/src/sys/dev/iicbus/iic.c#9 edit

Differences ...

==== //depot/projects/arm/src/sys/dev/iicbus/iic.c#9 (text+ko) ====

@@ -246,15 +246,13 @@
 	char *buf = NULL;
 	void **usrbufs = NULL;
 
-	if (!sc) { printf("iic einval\n");
-		return (EINVAL); }
+	if (!sc)
+		return (EINVAL);
 
 	if ((error = iicbus_request_bus(device_get_parent(iicdev), iicdev,
 			(flags & O_NONBLOCK) ? IIC_DONTWAIT :
-						(IIC_WAIT | IIC_INTR)))) {
-		printf("bus request failed %d\n", error);
+						(IIC_WAIT | IIC_INTR))))
 		return (error);
-	}
 
 	switch (cmd) {
 	case I2CSTART:
@@ -284,10 +282,6 @@
 			break;
 		}
 		buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK);
-		if (buf == NULL) {
-			error = ENOMEM;
-			break;
-		}
 		error = copyin(s->buf, buf, s->count);
 		if (error)
 			break;
@@ -300,10 +294,6 @@
 			break;
 		}
 		buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK);
-		if (buf == NULL) {
-			error = ENOMEM;
-			break;
-		}
 		error = iicbus_read(parent, buf, s->count, &count, s->last, 10);
 		if (error)
 			break;
@@ -314,10 +304,8 @@
 		buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK);
 		usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK);
 		error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs);
-		if (error) {
-			printf("copyin msgs returns %d\n", error);
+		if (error)
 			break;
-		}
 		/* Alloc kernel buffers for userland data, copyin write data */
 		for (i = 0; i < d->nmsgs; i++) {
 			m = &((struct iic_msg *)buf)[i];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611220602.kAM62SPn056159>