Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ipa: set error code in gsi_channel_setup()

In gsi_channel_setup(), we check to see if the configuration data
contains any information about channels that are not supported by
the hardware. If one is found, we abort the setup process, but
the error code (ret) is not set in this case. Fix this bug.

Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20210204010655.15619-1-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alex Elder and committed by
Jakub Kicinski
1d23a56b 81b8be68

+1
+1
drivers/net/ipa/gsi.c
··· 1710 1710 if (!channel->gsi) 1711 1711 continue; /* Ignore uninitialized channels */ 1712 1712 1713 + ret = -EINVAL; 1713 1714 dev_err(gsi->dev, "channel %u not supported by hardware\n", 1714 1715 channel_id - 1); 1715 1716 channel_id = gsi->channel_count;