Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / sound / ppc / keywest.c
index 272ae38..fb05938 100644 (file)
@@ -64,10 +64,11 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
        if (strncmp(i2c_device_name(adapter), "mac-io", 6))
                return 0; /* ignored */
 
-       new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
        if (! new_client)
                return -ENOMEM;
 
+       memset(new_client, 0, sizeof(*new_client));
        new_client->addr = keywest_ctx->addr;
        i2c_set_clientdata(new_client, keywest_ctx);
        new_client->adapter = adapter;
@@ -117,9 +118,6 @@ int __init snd_pmac_tumbler_post_init(void)
 {
        int err;
        
-       if (!keywest_ctx || !keywest_ctx->client)
-               return -ENXIO;
-
        if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
                snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err);
                return err;