Commit 18ffbc47 authored by Pavel Machek's avatar Pavel Machek Committed by Greg Kroah-Hartman
Browse files

intel_th: Consistency and off-by-one fix

parent d9962f6f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -543,7 +543,7 @@ static void intel_th_gth_disable(struct intel_th_device *thdev,
	output->active = false;

	for_each_set_bit(master, gth->output[output->port].master,
			 TH_CONFIGURABLE_MASTERS) {
			 TH_CONFIGURABLE_MASTERS + 1) {
		gth_master_set(gth, master, -1);
	}
	spin_unlock(&gth->gth_lock);
@@ -697,7 +697,7 @@ static void intel_th_gth_unassign(struct intel_th_device *thdev,
	othdev->output.port = -1;
	othdev->output.active = false;
	gth->output[port].output = NULL;
	for (master = 0; master <= TH_CONFIGURABLE_MASTERS; master++)
	for (master = 0; master < TH_CONFIGURABLE_MASTERS + 1; master++)
		if (gth->master[master] == port)
			gth->master[master] = -1;
	spin_unlock(&gth->gth_lock);