Unverified Commit 5cab0d6c authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

ASoC: SOF: ipc4-loader: Return ssize_t from sof_ipc4_fw_parse_ext_man()



sof_ipc4_fw_parse_ext_man() can return negative error numbers which is not
correct for the used size_t type.

Change the return value to ssize_t and use the same type where the function
is called.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 73c091a2 ("ASoC: SOF: ipc4-loader: Support for loading external libraries")
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221025132706.30356-1-peter.ujfalusi@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 514bc59b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
/* The module ID includes the id of the library it is part of at offset 12 */
#define SOF_IPC4_MOD_LIB_ID_SHIFT	12

static size_t sof_ipc4_fw_parse_ext_man(struct snd_sof_dev *sdev,
static ssize_t sof_ipc4_fw_parse_ext_man(struct snd_sof_dev *sdev,
					 struct sof_ipc4_fw_library *fw_lib)
{
	struct sof_ipc4_fw_data *ipc4_data = sdev->private;
@@ -141,7 +141,7 @@ static size_t sof_ipc4_fw_parse_basefw_ext_man(struct snd_sof_dev *sdev)
{
	struct sof_ipc4_fw_data *ipc4_data = sdev->private;
	struct sof_ipc4_fw_library *fw_lib;
	size_t payload_offset;
	ssize_t payload_offset;
	int ret;

	fw_lib = devm_kzalloc(sdev->dev, sizeof(*fw_lib), GFP_KERNEL);
@@ -170,7 +170,7 @@ static int sof_ipc4_load_library_by_uuid(struct snd_sof_dev *sdev,
	struct sof_ipc4_fw_data *ipc4_data = sdev->private;
	struct sof_ipc4_fw_library *fw_lib;
	const char *fw_filename;
	size_t payload_offset;
	ssize_t payload_offset;
	int ret, i, err;

	if (!sdev->pdata->fw_lib_prefix) {