mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
rpmsg: qcom_smd: Fix uninitialized return variable in __qcom_smd_send()
[ Upstream commit5de775df33
] The "ret" variable isn't initialized if we don't enter the loop. For example, if "channel->state" is not SMD_CHANNEL_OPENED. Fixes:33e3820dda
("rpmsg: smd: Use spinlock in tx path") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/aAkhvV0nSbrsef1P@stanley.mountain Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ece7ec7b61
commit
f0a327873c
|
@ -746,7 +746,7 @@ static int __qcom_smd_send(struct qcom_smd_channel *channel, const void *data,
|
|||
__le32 hdr[5] = { cpu_to_le32(len), };
|
||||
int tlen = sizeof(hdr) + len;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
/* Word aligned channels only accept word size aligned data */
|
||||
if (channel->info_word && len % 4)
|
||||
|
|
Loading…
Reference in New Issue
Block a user