Index: channels/chan_misdn.c
===================================================================
--- channels/chan_misdn.c	(revision 177657)
+++ channels/chan_misdn.c	(working copy)
@@ -3406,7 +3406,7 @@
 	ast_playtones_stop(ast);
 
 	if (cl->ts) {
-		cl->ts = ast_tone_zone_sound_unref(cl->ts);
+		ast_tone_zone_sound_unref(cl->ts);
 	}
 
 	return 0;
Index: channels/chan_skinny.c
===================================================================
--- channels/chan_skinny.c	(revision 177657)
+++ channels/chan_skinny.c	(working copy)
@@ -3776,7 +3776,7 @@
 				/* play ringing inband */
 				if ((ts = ast_get_indication_tone(xferor->owner->zone, "ring"))) {
 					ast_playtones_start(xferor->owner, 0, ts->data, 1);
-					ts = ast_tone_zone_sound_unref(ts);
+					ast_tone_zone_sound_unref(ts);
 				}
 			}
 			if (skinnydebug)
@@ -3793,7 +3793,7 @@
 				/* play ringing inband */
 				if ((ts = ast_get_indication_tone(xferor->owner->zone, "ring"))) {
 					ast_playtones_start(xferor->owner, 0, ts->data, 1);
-					ts = ast_tone_zone_sound_unref(ts);
+					ast_tone_zone_sound_unref(ts);
 				}
 			}
 			if (skinnydebug)
Index: channels/chan_unistim.c
===================================================================
--- channels/chan_unistim.c	(revision 177657)
+++ channels/chan_unistim.c	(working copy)
@@ -4064,7 +4064,7 @@
 
 	if ((ts = ast_get_indication_tone(tz, indication))) {
 		ast_playtones_start(ast, 0, ts->data, 1);
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 	} else {
 		ast_log(LOG_WARNING, "Unable to get indication tone for %s\n", indication);
 	}
Index: apps/app_read.c
===================================================================
--- apps/app_read.c	(revision 177657)
+++ apps/app_read.c	(working copy)
@@ -259,7 +259,7 @@
 	}
 
 	if (ts) {
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 	}
 
 	if (ast_check_hangup(chan))
Index: apps/app_playtones.c
===================================================================
--- apps/app_playtones.c	(revision 177657)
+++ apps/app_playtones.c	(working copy)
@@ -87,7 +87,7 @@
 
 	if (ts) {
 		res = ast_playtones_start(chan, 0, ts->data, 0);
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 	} else {
 		res = ast_playtones_start(chan, 0, str, 0);
 	}
Index: apps/app_readexten.c
===================================================================
--- apps/app_readexten.c	(revision 177657)
+++ apps/app_readexten.c	(working copy)
@@ -252,7 +252,7 @@
 	} while (0);
 
 	if (ts) {
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 	}
 
 	pbx_builtin_setvar_helper(chan, "READEXTENSTATUS", status);
Index: apps/app_disa.c
===================================================================
--- apps/app_disa.c	(revision 177657)
+++ apps/app_disa.c	(working copy)
@@ -134,7 +134,7 @@
 
 	if (ts) {
 		ast_playtones_start(chan, 0, ts->data, 0);
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 	} else {
 		ast_tonepair_start(chan, 350, 440, 0, 0);
 	}
Index: funcs/func_channel.c
===================================================================
--- funcs/func_channel.c	(revision 177657)
+++ funcs/func_channel.c	(working copy)
@@ -303,11 +303,11 @@
 		} else {
 			ast_channel_lock(chan);
 			if (chan->zone) {
-				chan->zone = ast_tone_zone_unref(chan->zone);
+				ast_tone_zone_unref(chan->zone);
 			}
 			chan->zone = ast_tone_zone_ref(new_zone);
 			ast_channel_unlock(chan);
-			new_zone = ast_tone_zone_unref(new_zone);
+			ast_tone_zone_unref(new_zone);
 		}
 	} else if (!strcasecmp(data, "callgroup"))
 		chan->callgroup = ast_get_group(value);
Index: main/channel.c
===================================================================
--- main/channel.c	(revision 177657)
+++ main/channel.c	(working copy)
@@ -1405,7 +1405,7 @@
 	}
 
 	if (chan->zone) {
-		chan->zone = ast_tone_zone_unref(chan->zone);
+		ast_tone_zone_unref(chan->zone);
 	}
 
 	ast_mutex_destroy(&chan->lock_dont_use);
@@ -2989,7 +2989,7 @@
 		/* We have a tone to play, yay. */
 		ast_debug(1, "Driver for channel '%s' does not support indication %d, emulating it\n", chan->name, condition);
 		ast_playtones_start(chan, 0, ts->data, 1);
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 		res = 0;
 		chan->visible_indication = condition;
 	}
Index: main/app.c
===================================================================
--- main/app.c	(revision 177657)
+++ main/app.c	(working copy)
@@ -89,7 +89,7 @@
 
 	if ((ts = ast_get_indication_tone(chan->zone, "dial"))) {
 		res = ast_playtones_start(chan, 0, ts->data, 0);
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 	} else {
 		ast_log(LOG_NOTICE, "Huh....? no dial for indications?\n");
 	}
Index: main/indications.c
===================================================================
--- main/indications.c	(revision 177657)
+++ main/indications.c	(working copy)
@@ -411,12 +411,12 @@
 
 	ao2_lock(ast_tone_zones);
 	if (default_tone_zone) {
-		default_tone_zone = ast_tone_zone_unref(default_tone_zone);
+		ast_tone_zone_unref(default_tone_zone);
 	}
 	default_tone_zone = ast_tone_zone_ref(zone);
 	ao2_unlock(ast_tone_zones);
 
-	zone = ast_tone_zone_unref(zone);
+	ast_tone_zone_unref(zone);
 
 	return 0;
 }
@@ -502,7 +502,7 @@
 	struct ast_tone_zone_sound *current;
 
 	while ((current = AST_LIST_REMOVE_HEAD(&zone->tones, entry))) {
-		current = ast_tone_zone_sound_unref(current);
+		ast_tone_zone_sound_unref(current);
 	}
 
 	if (zone->ringcadence) {
@@ -551,7 +551,7 @@
 
 	ao2_unlink(ast_tone_zones, tz);
 
-	tz = ast_tone_zone_unref(tz);
+	ast_tone_zone_unref(tz);
 
 	return 0;
 }
@@ -571,7 +571,7 @@
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&zone->tones, ts, entry) {
 		if (!strcasecmp(indication, ts->name)) {
 			AST_LIST_REMOVE_CURRENT(entry);
-			ts = ast_tone_zone_sound_unref(ts);
+			ast_tone_zone_sound_unref(ts);
 			break;
 		}
 	}
@@ -582,7 +582,7 @@
 	}
 
 	if (!(ts->name = ast_strdup(indication)) || !(ts->data = ast_strdup(tonelist))) {
-		ts = ast_tone_zone_sound_unref(ts);
+		ast_tone_zone_sound_unref(ts);
 		return -1;
 	}
 
@@ -602,7 +602,7 @@
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&zone->tones, ts, entry) {
 		if (!strcasecmp(indication, ts->name)) {
 			AST_LIST_REMOVE_CURRENT(entry);
-			ts = ast_tone_zone_sound_unref(ts);
+			ast_tone_zone_sound_unref(ts);
 			res = 0;
 			break;
 		}
@@ -634,7 +634,7 @@
 		if (!strncasecmp(a->word, tz->country, wordlen) && ++which > a->n) {
 			res = ast_strdup(tz->country);
 		}
-		tz = ast_tone_zone_unref(tz);
+		ast_tone_zone_unref(tz);
 		if (res) {
 			break;
 		}
@@ -680,7 +680,7 @@
 
 		if (ast_register_indication_country(tz)) {
 			ast_log(LOG_WARNING, "Unable to register new country\n");
-			tz = ast_tone_zone_unref(tz);
+			ast_tone_zone_unref(tz);
 			return CLI_FAILURE;
 		}
 
@@ -699,7 +699,7 @@
 
 	ast_tone_zone_unlock(tz);
 
-	tz = ast_tone_zone_unref(tz);
+	ast_tone_zone_unref(tz);
 
 	return res;
 }
@@ -731,7 +731,7 @@
 	}
 	ast_tone_zone_unlock(tz);
 
-	tz = ast_tone_zone_unref(tz);
+	ast_tone_zone_unref(tz);
 
 	return res;
 }
@@ -780,7 +780,7 @@
 		res = CLI_FAILURE;
 	}
 
-	tz = ast_tone_zone_unref(tz);
+	ast_tone_zone_unref(tz);
 
 	return res;
 }
@@ -814,7 +814,7 @@
 			ast_tone_zone_lock(tz);
 			ast_cli(a->fd, "%-7.7s  %s\n", tz->country, tz->description);
 			ast_tone_zone_unlock(tz);
-			tz = ast_tone_zone_unref(tz);
+			ast_tone_zone_unref(tz);
 		}
 		return CLI_SUCCESS;
 	}
@@ -855,7 +855,7 @@
 		}
 
 		ast_tone_zone_unlock(tz);
-		tz = ast_tone_zone_unref(tz);
+		ast_tone_zone_unref(tz);
 	}
 
 	if (!found_country) {
@@ -970,7 +970,7 @@
 		}
 	}
 
-	zone = ast_tone_zone_unref(zone);
+	ast_tone_zone_unref(zone);
 
 	return 0;
 }
@@ -1011,7 +1011,7 @@
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&zone->tones, s, entry) {
 		if (s->killme) {
 			AST_LIST_REMOVE_CURRENT(entry);
-			s = ast_tone_zone_sound_unref(s);
+			ast_tone_zone_sound_unref(s);
 		}
 	}
 	AST_LIST_TRAVERSE_SAFE_END;
Index: main/pbx.c
===================================================================
--- main/pbx.c	(revision 177657)
+++ main/pbx.c	(working copy)
@@ -8665,7 +8665,7 @@
 		struct ast_tone_zone_sound *ts = ast_get_indication_tone(chan->zone, "dial");
 		if (ts) {
 			ast_playtones_start(chan, 0, ts->data, 0);
-			ts = ast_tone_zone_sound_unref(ts);
+			ast_tone_zone_sound_unref(ts);
 		} else {
 			ast_tonepair_start(chan, 350, 440, 0, 0);
 		}
