Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Check the return value correctly. Pointed out by...
details: https://anonhg.NetBSD.org/src/rev/c0b461af3104
branches: trunk
changeset: 1026767:c0b461af3104
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Dec 06 16:24:57 2021 +0000
description:
Check the return value correctly. Pointed out by pgoyette@.
diffstat:
sys/dev/i2c/spdmem_i2c.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r f5855f38435e -r c0b461af3104 sys/dev/i2c/spdmem_i2c.c
--- a/sys/dev/i2c/spdmem_i2c.c Mon Dec 06 16:00:07 2021 +0000
+++ b/sys/dev/i2c/spdmem_i2c.c Mon Dec 06 16:24:57 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.24 2021/12/06 04:25:36 msaitoh Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.25 2021/12/06 16:24:57 msaitoh Exp $ */
/*
* Copyright (c) 2007 Nicolas Joly
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.24 2021/12/06 04:25:36 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.25 2021/12/06 16:24:57 msaitoh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -121,7 +121,7 @@
goto error;
reg = 2;
- rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1,
+ rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1,
&byte2, 1, 0);
if (rv != 0)
goto error;
Home |
Main Index |
Thread Index |
Old Index