Module Name: src
Committed By: thorpej
Date: Tue Dec 31 14:27:50 UTC 2019
Modified Files:
src/sys/dev/i2c: nxt2k.c
Log Message:
Fix mis-placed parentheses. PR kern/54813.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/nxt2k.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/nxt2k.c
diff -u src/sys/dev/i2c/nxt2k.c:1.6 src/sys/dev/i2c/nxt2k.c:1.7
--- src/sys/dev/i2c/nxt2k.c:1.6 Mon Dec 23 19:00:59 2019
+++ src/sys/dev/i2c/nxt2k.c Tue Dec 31 14:27:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: nxt2k.c,v 1.6 2019/12/23 19:00:59 thorpej Exp $ */
+/* $NetBSD: nxt2k.c,v 1.7 2019/12/31 14:27:50 thorpej Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nxt2k.c,v 1.6 2019/12/23 19:00:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nxt2k.c,v 1.7 2019/12/31 14:27:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -74,7 +74,7 @@ nxt2k_writedata(struct nxt2k *nxt, uint8
KASSERT((len + 1) <= 384);
- if ((error = iic_acquire_bus(nxt->tag, 0) != 0))
+ if ((error = iic_acquire_bus(nxt->tag, 0)) != 0)
return error;
buffer[0] = reg;
@@ -93,7 +93,7 @@ nxt2k_readdata(struct nxt2k *nxt, uint8_
{
int error;
- if ((error = iic_acquire_bus(nxt->tag, 0) != 0))
+ if ((error = iic_acquire_bus(nxt->tag, 0)) != 0)
return error;
error = iic_exec(nxt->tag, I2C_OP_READ_WITH_STOP, nxt->addr,