[2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Coverity checker found this obviously dead code.

I'mnot sure which of the if (plugin == NULL) is correct - this patch 
removes the one that couldn't be true.

Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c.old	2005-03-23 01:06:58.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c	2005-03-23 01:07:41.000000000 +0100
@@ -657,22 +657,19 @@ static int snd_pcm_plug_playback_channel
 	if (plugin == NULL) {
 		return 0;
 	} else {
 		int schannels = plugin->dst_format.channels;
 		bitset_t bs[bitset_size(schannels)];
 		bitset_t *srcmask;
 		bitset_t *dstmask = bs;
 		int err;
 		bitset_one(dstmask, schannels);
-		if (plugin == NULL) {
-			bitset_and(client_vmask, dstmask, schannels);
-			return 0;
-		}
+
 		while (1) {
 			err = plugin->src_channels_mask(plugin, dstmask, &srcmask);
 			if (err < 0)
 				return err;
 			dstmask = srcmask;
 			if (plugin->prev == NULL)
 				break;
 			plugin = plugin->prev;
 		}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux