From dccd87acc33583c8ee8dd0d2780694540561bb66 Mon Sep 17 00:00:00 2001
From: Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Date: Mon, 26 May 2003 22:16:20 -0700
Subject: [PATCH] [PATCH] Fix sound lockup - missing chardev init

Argh.  Missing initialization in char_dev.c - it's definitely
responsible for crap on unload.  Load side appears to be something else,
though...
---
 fs/char_dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/char_dev.c b/fs/char_dev.c
index 5b340702bdd2..a2881c94276e 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -89,6 +89,8 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
 	if (cd == NULL)
 		return ERR_PTR(-ENOMEM);
 
+	memset(cd, 0, sizeof(struct char_device_struct));
+
 	write_lock_irq(&chrdevs_lock);
 
 	/* temporary */
-- 
2.30.9