Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[sfrench/cifs-2.6.git] / sound / oss / ad1848.c
index 0ffa9970bf0ff307cee68b9698c3bffc63f3eee9..d12bd98a37ba6f207190df984ae113be1e5e8dcd 100644 (file)
@@ -280,7 +280,7 @@ static void wait_for_calibration(ad1848_info * devc)
        while (timeout > 0 && (ad_read(devc, 11) & 0x20))
                timeout--;
        if (ad_read(devc, 11) & 0x20)
-               if ( (devc->model != MD_1845) || (devc->model != MD_1845_SSCAPE))
+               if ((devc->model != MD_1845) && (devc->model != MD_1845_SSCAPE))
                        printk(KERN_WARNING "ad1848: Auto calibration timed out(3).\n");
 }
 
@@ -1992,7 +1992,7 @@ int ad1848_init (char *name, struct resource *ports, int irq, int dma_playback,
                        devc->audio_flags |= DMA_DUPLEX;
        }
 
-       portc = (ad1848_port_info *) kmalloc(sizeof(ad1848_port_info), GFP_KERNEL);
+       portc = kmalloc(sizeof(ad1848_port_info), GFP_KERNEL);
        if(portc==NULL) {
                release_region(devc->base, 4);
                return -1;
@@ -2107,7 +2107,7 @@ int ad1848_control(int cmd, int arg)
        switch (cmd)
        {
                case AD1848_SET_XTAL:   /* Change clock frequency of AD1845 (only ) */
-                       if (devc->model != MD_1845 || devc->model != MD_1845_SSCAPE)
+                       if (devc->model != MD_1845 && devc->model != MD_1845_SSCAPE)
                                return -EINVAL;
                        spin_lock_irqsave(&devc->lock,flags);
                        ad_enter_MCE(devc);