Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jdolecek-ncq]: src/sys/dev/ata Avoid destroying uninitialized xfer on er...
details: https://anonhg.NetBSD.org/src/rev/1568ab39dcef
branches: jdolecek-ncq
changeset: 352643:1568ab39dcef
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Apr 22 20:07:54 2017 +0000
description:
Avoid destroying uninitialized xfer on error in wdioctlstrategy().
diffstat:
sys/dev/ata/wd.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 89c7e6cc4a4e -r 1568ab39dcef sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Sat Apr 22 14:08:38 2017 +0000
+++ b/sys/dev/ata/wd.c Sat Apr 22 20:07:54 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.428.2.9 2017/04/19 21:42:39 jdolecek Exp $ */
+/* $NetBSD: wd.c,v 1.428.2.10 2017/04/22 20:07:54 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.9 2017/04/19 21:42:39 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.10 2017/04/22 20:07:54 jakllsch Exp $");
#include "opt_ata.h"
@@ -2249,7 +2249,7 @@
printf("wdioctlstrategy: "
"No matching ioctl request found in queue\n");
error = EINVAL;
- goto out;
+ goto out2;
}
ata_xfer_init(&xfer, true);
@@ -2342,6 +2342,7 @@
out:
ata_xfer_destroy(&xfer);
+out2:
bp->b_error = error;
if (error)
bp->b_resid = bp->b_bcount;
Home |
Main Index |
Thread Index |
Old Index