Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Missing ata_channel_unlock(chp). Noted by mjg@fre...



details:   https://anonhg.NetBSD.org/src/rev/792ecb7a3d7a
branches:  trunk
changeset: 460439:792ecb7a3d7a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 23 14:44:41 2019 +0000

description:
Missing ata_channel_unlock(chp). Noted by mjg@freebsd.

diffstat:

 sys/dev/ic/wdc.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 29a7cae085ed -r 792ecb7a3d7a sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Wed Oct 23 12:02:55 2019 +0000
+++ b/sys/dev/ic/wdc.c  Wed Oct 23 14:44:41 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.293 2019/10/22 12:09:11 martin Exp $ */
+/*     $NetBSD: wdc.c,v 1.294 2019/10/23 14:44:41 christos Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.293 2019/10/22 12:09:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.294 2019/10/23 14:44:41 christos Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -296,8 +296,10 @@
        int i, j, error, tfd;
 
        ata_channel_lock(chp);
-       if (atabus_alloc_drives(chp, wdc->wdc_maxdrives) != 0)
+       if (atabus_alloc_drives(chp, wdc->wdc_maxdrives) != 0) {
+               ata_channel_unlock(chp);
                return;
+       }
        if (wdcprobe1(chp, 0) == 0) {
                /* No drives, abort the attach here. */
                atabus_free_drives(chp);



Home | Main Index | Thread Index | Old Index