From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Kalle Valo <kvalo@kernel.org>, Jeff Johnson <jjohnson@kernel.org>,
Kang Yang <quic_kangyang@quicinc.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
"Kalle Valo" <quic_kvalo@quicinc.com>,
<linux-wireless@vger.kernel.org>, <ath11k@lists.infradead.org>
Subject: Re: [PATCH] wifi: ath11k: Fix error handling in ath11k_wmi_p2p_noa_event()
Date: Mon, 15 Apr 2024 09:18:48 -0700 [thread overview]
Message-ID: <b4c8a18c-286c-442f-a7e9-d4a0bb604083@quicinc.com> (raw)
In-Reply-To: <6ee80f65f736db1646f6f201f60816cf35b6f3fe.1713180046.git.christophe.jaillet@wanadoo.fr>
On 4/15/2024 4:23 AM, Christophe JAILLET wrote:
> if (noa_descriptors > WMI_P2P_MAX_NOA_DESCRIPTORS), there is a mix of
> return and goto. in such a case, 'ret' should be assigned an error code and
> the 'td' should be freed to avoid a memory leak.
>
> While at it, return 'ret' instead of 0 in case of error.
> This is actually harmless, because the only caller does not handle the
> return value.
in that case it would be preferable to change this to be a void function and
not return anything. that would be consistent with most, if not all, of the
other event handlers
prev parent reply other threads:[~2024-04-15 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 11:23 [PATCH] wifi: ath11k: Fix error handling in ath11k_wmi_p2p_noa_event() Christophe JAILLET
2024-04-15 16:18 ` Jeff Johnson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4c8a18c-286c-442f-a7e9-d4a0bb604083@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=ath11k@lists.infradead.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jjohnson@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_kangyang@quicinc.com \
--cc=quic_kvalo@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).