Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej-i2c-spi-conf]: src/sys/dev/i2c Check for errors from iic_acquire...
details: https://anonhg.NetBSD.org/src/rev/fafc064c7d71
branches: thorpej-i2c-spi-conf
changeset: 378787:fafc064c7d71
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun May 16 21:04:59 2021 +0000
description:
Check for errors from iic_acquire_bus() in iic_ioctl_exec().
diffstat:
sys/dev/i2c/i2c.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r d73e3ff9833d -r fafc064c7d71 sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Sun May 16 21:03:38 2021 +0000
+++ b/sys/dev/i2c/i2c.c Sun May 16 21:04:59 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i2c.c,v 1.78.2.4 2021/05/16 21:03:38 thorpej Exp $ */
+/* $NetBSD: i2c.c,v 1.78.2.5 2021/05/16 21:04:59 thorpej Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.78.2.4 2021/05/16 21:03:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.78.2.5 2021/05/16 21:04:59 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1005,7 +1005,9 @@ iic_ioctl_exec(struct iic_softc *sc, i2c
goto out;
}
- iic_acquire_bus(ic, 0);
+ if ((error = iic_acquire_bus(ic, 0)) != 0) {
+ goto out;
+ }
error = iic_exec(ic, iie->iie_op, iie->iie_addr, cmd, iie->iie_cmdlen,
buf, iie->iie_buflen, 0);
iic_release_bus(ic, 0);
Home |
Main Index |
Thread Index |
Old Index