Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Also initialize wdc->reset in wdcprobe() if the b...
details: https://anonhg.NetBSD.org/src/rev/fd363c052f17
branches: trunk
changeset: 583511:fd363c052f17
user: bouyer <bouyer%NetBSD.org@localhost>
date: Wed Aug 10 11:16:53 2005 +0000
description:
Also initialize wdc->reset in wdcprobe() if the bus back-end didn't provide
one. Prevent NULL pointer dereference when wdcprobe() is called.
diffstat:
sys/dev/ic/wdc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 03657a025a20 -r fd363c052f17 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c Wed Aug 10 09:44:02 2005 +0000
+++ b/sys/dev/ic/wdc.c Wed Aug 10 11:16:53 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.226 2005/08/09 22:08:16 bouyer Exp $ */
+/* $NetBSD: wdc.c,v 1.227 2005/08/10 11:16:53 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.226 2005/08/09 22:08:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.227 2005/08/10 11:16:53 bouyer Exp $");
#ifndef ATADEBUG
#define ATADEBUG
@@ -397,6 +397,9 @@
int
wdcprobe(struct ata_channel *chp)
{
+ /* default reset method */
+ if (wdc->reset == NULL)
+ wdc->reset = wdc_do_reset;
return (wdcprobe1(chp, 1));
}
Home |
Main Index |
Thread Index |
Old Index