linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] net: ipa: set error code in gsi_channel_setup()
@ 2021-02-04  1:06 Alex Elder
  2021-02-05  4:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2021-02-04  1:06 UTC (permalink / raw)
  To: davem, kuba
  Cc: dan.carpenter, elder, evgreen, bjorn.andersson, cpratapa,
	subashab, netdev, linux-kernel

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>
---
v2: Added "Fixes" tag.

 drivers/net/ipa/gsi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index 34e5f2155d620..b77f5fef7aeca 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -1710,6 +1710,7 @@ static int gsi_channel_setup(struct gsi *gsi)
 		if (!channel->gsi)
 			continue;	/* Ignore uninitialized channels */
 
+		ret = -EINVAL;
 		dev_err(gsi->dev, "channel %u not supported by hardware\n",
 			channel_id - 1);
 		channel_id = gsi->channel_count;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net v2] net: ipa: set error code in gsi_channel_setup()
  2021-02-04  1:06 [PATCH net v2] net: ipa: set error code in gsi_channel_setup() Alex Elder
@ 2021-02-05  4:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-05  4:20 UTC (permalink / raw)
  To: Alex Elder
  Cc: davem, kuba, dan.carpenter, elder, evgreen, bjorn.andersson,
	cpratapa, subashab, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Wed,  3 Feb 2021 19:06:55 -0600 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net,v2] net: ipa: set error code in gsi_channel_setup()
    https://git.kernel.org/netdev/net/c/1d23a56b0296

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-05  4:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04  1:06 [PATCH net v2] net: ipa: set error code in gsi_channel_setup() Alex Elder
2021-02-05  4:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).