intel_th: msu: Fix the unexpected state warning

The unexpected state warning should only warn on illegal state
transitions. Fix that.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 615c164da0eb4 ("intel_th: msu: Introduce buffer interface")
Cc: stable@vger.kernel.org # v5.4+
Link: https://lore.kernel.org/r/20200317062215.15598-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by Alexander Shishkin and committed by Greg Kroah-Hartman 885f1235 283f87c0

Changed files
+4 -3
drivers
hwtracing
intel_th
+4 -3
drivers/hwtracing/intel_th/msu.c
··· 718 718 719 719 if (old != expect) { 720 720 ret = -EINVAL; 721 - dev_warn_ratelimited(msc_dev(win->msc), 722 - "expected lockout state %d, got %d\n", 723 - expect, old); 724 721 goto unlock; 725 722 } 726 723 ··· 738 741 /* from intel_th_msc_window_unlock(), don't warn if not locked */ 739 742 if (expect == WIN_LOCKED && old == new) 740 743 return 0; 744 + 745 + dev_warn_ratelimited(msc_dev(win->msc), 746 + "expected lockout state %d, got %d\n", 747 + expect, old); 741 748 } 742 749 743 750 return ret;