From 3602540158001573f201e43c93bb9b670c3db07e Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 14 Jul 2021 01:11:13 +0000 Subject: [PATCH] fix "logically dead code" flagged by coverity 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@ --- sys/dev/ic/twe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index f541a0b0faa..d7d17feaa5a 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $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. @@ -369,7 +369,7 @@ twe_attach(struct twe_softc *sc) 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) { -- 2.20.1