diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2025-07-22 12:47:05 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-07-22 15:34:08 +0100 |
commit | 246570cd351299959822ac21e75e2975f80ce4b7 (patch) | |
tree | a49603e0efd9440280dc1d1fdf0b8dab56975403 | |
parent | 59c5dbd585a0bee70e51fcdf36185f7602b9c285 (diff) |
ASoC: SDCA: Fix implicit cast from le16
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>
Link: https://patch.msgid.link/20250722114705.2816910-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sdca/sdca_hid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |