Skip to content

Commit ce666be

Browse files
virtuosogregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Fixes: ba82664 ("intel_th: Add Memory Storage Unit driver") Cc: [email protected] # v4.4+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 885f123 commit ce666be

File tree

1 file changed

+3
-3
lines changed
  • drivers/hwtracing/intel_th

1 file changed

+3
-3
lines changed

drivers/hwtracing/intel_th/msu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ static int msc_configure(struct msc *msc)
761761
lockdep_assert_held(&msc->buf_mutex);
762762

763763
if (msc->mode > MSC_MODE_MULTI)
764-
return -ENOTSUPP;
764+
return -EINVAL;
765765

766766
if (msc->mode == MSC_MODE_MULTI) {
767767
if (msc_win_set_lockout(msc->cur_win, WIN_READY, WIN_INUSE))
@@ -1295,7 +1295,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages,
12951295
} else if (msc->mode == MSC_MODE_MULTI) {
12961296
ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins);
12971297
} else {
1298-
ret = -ENOTSUPP;
1298+
ret = -EINVAL;
12991299
}
13001300

13011301
if (!ret) {
@@ -1531,7 +1531,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,
15311531
if (ret >= 0)
15321532
*ppos = iter->offset;
15331533
} else {
1534-
ret = -ENOTSUPP;
1534+
ret = -EINVAL;
15351535
}
15361536

15371537
put_count:

0 commit comments

Comments
 (0)