Skip to content

Commit 246570c

Browse files
charleskeepaxbroonie
authored andcommitted
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: ac55801 ("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>
1 parent 59c5dbd commit 246570c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/sdca/sdca_hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static int sdwhid_parse(struct hid_device *hid)
2424
unsigned int rsize;
2525
int ret;
2626

27-
rsize = entity->hide.hid_desc.rpt_desc.wDescriptorLength;
27+
rsize = le16_to_cpu(entity->hide.hid_desc.rpt_desc.wDescriptorLength);
2828

2929
if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
3030
dev_err(&hid->dev, "invalid size of report descriptor (%u)\n", rsize);

0 commit comments

Comments
 (0)