diff options
| author | pooka <pooka@NetBSD.org> | 2009-06-10 14:17:13 +0000 |
|---|---|---|
| committer | pooka <pooka@NetBSD.org> | 2009-06-10 14:17:13 +0000 |
| commit | 1e115afaf09f57dbb544e671d49a8f45ffa12688 (patch) | |
| tree | bde3da90b6768735811bb61fa04201378be8fd98 /sys/dev/raidframe | |
| parent | 384a097b904c89d4f08f6d544ed42c43eedcbc86 (diff) | |
Attempt bailout if config_attach_pseudo() fails. Otherwise, a few
moments later, we'll take a fatal plunge because sc_dev is null.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 77e1fd2fe14..afc90187b84 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.264 2009/06/06 08:10:06 haad Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.265 2009/06/10 14:17:13 pooka Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -139,7 +139,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.264 2009/06/06 08:10:06 haad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.265 2009/06/10 14:17:13 pooka Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1872,6 +1872,9 @@ raidinit(RF_Raid_t *raidPtr) if (rs->sc_dev==NULL) { printf("raid%d: config_attach_pseudo failed\n", raidPtr->raidid); + rs->sc_flags &= ~RAIDF_INITED; + free(cf, M_RAIDFRAME); + return; } /* disk_attach actually creates space for the CPU disklabel, among |
