From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
To: "Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Piotr Kubaj <piotr.kubaj@intel.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1] platform/x86: ISST: Propagate def_ioctl errors to user space
Date: Mon, 16 Nov 2026 13:02:09 -0800 [thread overview]
Message-ID: <20261116210209.3737388-1-sathyanarayanan.kuppuswamy@linux.intel.com> (raw)
isst_if_def_ioctl() declares an inner "int ret" that shadows the outer
"long ret". When the TPMI def_ioctl callback fails, its error is lost
and user space always sees -ENOTTY.
Remove the inner variable. Return the callback result unless it is
-ENOTTY.
Fixes: 33c16dc1a2d1 ("platform/x86: ISST: Add IOCTL default callback")
Reported-by: Piotr Kubaj <piotr.kubaj@intel.com>
Co-developed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
---
.../platform/x86/intel/speed_select_if/isst_if_common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
index 4c04f0bc9b47..fecb908bc88c 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
@@ -614,12 +614,12 @@ static long isst_if_def_ioctl(struct file *file, unsigned int cmd,
default:
for (i = 0; i < ISST_IF_DEV_MAX; ++i) {
struct isst_if_cmd_cb *cb = &punit_callbacks[i];
- int ret;
if (cb->def_ioctl) {
- ret = cb->def_ioctl(file, cmd, arg);
- if (!ret)
- return ret;
+ long def_ret = cb->def_ioctl(file, cmd, arg);
+
+ if (def_ret != -ENOTTY)
+ return def_ret;
}
}
break;
--
2.43.0
next reply other threads:[~2026-11-16 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 21:02 Kuppuswamy Sathyanarayanan [this message]
2026-11-19 14:42 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116210209.3737388-1-sathyanarayanan.kuppuswamy@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=piotr.kubaj@intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®