From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.dev, peter.ujfalusi@linux.intel.com,
shumingf@realtek.com, linux-sound@vger.kernel.org,
patches@opensource.cirrus.com
Subject: [PATCH] ASoC: SDCA: Fix implicit cast from le16
Date: Tue, 22 Jul 2025 12:47:05 +0100 [thread overview]
Message-ID: <20250722114705.2816910-1-ckeepax@opensource.cirrus.com> (raw)
As the HID wDescriptorLength is explicitly marked as little endian it
should be converted to host endian before being used.
Fixes: ac558015dfd8 ("ASoC: SDCA: add a HID device for HIDE entity")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507221024.M18hWD6q-lkp@intel.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/sdca/sdca_hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sdca/sdca_hid.c b/sound/soc/sdca/sdca_hid.c
index 2224ade59aff..967f7ec6fb79 100644
--- a/sound/soc/sdca/sdca_hid.c
+++ b/sound/soc/sdca/sdca_hid.c
@@ -24,7 +24,7 @@ static int sdwhid_parse(struct hid_device *hid)
unsigned int rsize;
int ret;
- rsize = entity->hide.hid_desc.rpt_desc.wDescriptorLength;
+ rsize = le16_to_cpu(entity->hide.hid_desc.rpt_desc.wDescriptorLength);
if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
dev_err(&hid->dev, "invalid size of report descriptor (%u)\n", rsize);
--
2.39.5
next reply other threads:[~2025-07-22 11:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 11:47 Charles Keepax [this message]
2025-07-22 16:06 ` [PATCH] ASoC: SDCA: Fix implicit cast from le16 Mark Brown
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=20250722114705.2816910-1-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=shumingf@realtek.com \
--cc=yung-chuan.liao@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.