intel_th: Fix user-visible error codes

There are a few places in the driver that end up returning ENOTSUPP to
the user, replace those with EINVAL.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver")
Cc: stable@vger.kernel.org # v4.4+
Link: https://lore.kernel.org/r/20200317062215.15598-6-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

Changed files
+3 -3
drivers
hwtracing
intel_th
+3 -3
drivers/hwtracing/intel_th/msu.c
··· 761 761 lockdep_assert_held(&msc->buf_mutex); 762 762 763 763 if (msc->mode > MSC_MODE_MULTI) 764 - return -ENOTSUPP; 764 + return -EINVAL; 765 765 766 766 if (msc->mode == MSC_MODE_MULTI) { 767 767 if (msc_win_set_lockout(msc->cur_win, WIN_READY, WIN_INUSE)) ··· 1295 1295 } else if (msc->mode == MSC_MODE_MULTI) { 1296 1296 ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins); 1297 1297 } else { 1298 - ret = -ENOTSUPP; 1298 + ret = -EINVAL; 1299 1299 } 1300 1300 1301 1301 if (!ret) { ··· 1531 1531 if (ret >= 0) 1532 1532 *ppos = iter->offset; 1533 1533 } else { 1534 - ret = -ENOTSUPP; 1534 + ret = -EINVAL; 1535 1535 } 1536 1536 1537 1537 put_count: