From e826c9fda98da443495fb33c3ce5cebbf1493e93 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 6 Dec 2010 21:21:53 +0100 Subject: [PATCH] amr(4): Return the correct error. error was not being set for two functions, and if these failed, 0 was incorrectly returned. --- sys/dev/raid/amr/amr_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/raid/amr/amr_pci.c b/sys/dev/raid/amr/amr_pci.c index 0ee0937610..70e68a8e25 100644 --- a/sys/dev/raid/amr/amr_pci.c +++ b/sys/dev/raid/amr/amr_pci.c @@ -333,11 +333,11 @@ amr_pci_attach(device_t dev) /* * Build the scatter/gather buffers. */ - if (amr_sglist_map(sc)) + if ((error = amr_sglist_map(sc)) != 0) goto out; debug(2, "s/g list mapped"); - if (amr_ccb_map(sc)) + if ((error = amr_ccb_map(sc)) != 0) goto out; debug(2, "ccb mapped"); -- 2.41.0