It looks like twe was refactored in 2011 and one error check was missed.
While the device may no longer be widely used, this helps reduce the
coverity alert count.
CID
1453371
ok krw@
-/* $OpenBSD: twe.c,v 1.65 2021/03/07 06:21:38 jsg Exp $ */
+/* $OpenBSD: twe.c,v 1.66 2021/07/14 01:11:13 daniel Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
cap->param_size = 4; /* 4 bytes */
lock = TWE_LOCK(sc);
- twe_cmd(ccb, BUS_DMA_NOWAIT, 1);
+ error = twe_cmd(ccb, BUS_DMA_NOWAIT, 1);
TWE_UNLOCK(sc, lock);
scsi_io_put(&sc->sc_iopool, ccb);
if (error) {