mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Robert Marko <robert.marko@sartura.hr>
Cc: kvalo@kernel.org, David Miller <davem@davemloft.net>,
	kuba@kernel.org, ath11k@lists.infradead.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ath11k: do not return random value
Date: Mon, 4 Apr 2022 18:45:11 +0200	[thread overview]
Message-ID: <1bd30dce-4046-721b-2207-32ace83af441@gmail.com> (raw)
In-Reply-To: <CA+HBbNHEK=CbyeeyPG=s=D2xofdSbk8Lxx5R9nij_cp6t7ybDA@mail.gmail.com>

On 4/4/22 18:35, Robert Marko wrote:
> On Mon, Apr 4, 2022 at 12:54 PM Michael Straube <straube.linux@gmail.com> wrote:
>>
>> Function ath11k_qmi_assign_target_mem_chunk() returns a random value
>> if of_parse_phandle() fails because the return variable ret is not
>> initialized before calling of_parse_phandle(). Return -EINVAL to avoid
>> possibly returning 0, which would be wrong here.
>>
>> Issue found by smatch.
>>
>> Signed-off-by: Michael Straube <straube.linux@gmail.com>
>> ---
>>   drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
>> index 65d3c6ba35ae..81b2304b1fde 100644
>> --- a/drivers/net/wireless/ath/ath11k/qmi.c
>> +++ b/drivers/net/wireless/ath/ath11k/qmi.c
>> @@ -1932,7 +1932,7 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab)
>>                          if (!hremote_node) {
>>                                  ath11k_dbg(ab, ATH11K_DBG_QMI,
>>                                             "qmi fail to get hremote_node\n");
>> -                               return ret;
>> +                               return -EINVAL;
>>                          }
>>
>>                          ret = of_address_to_resource(hremote_node, 0, &res);
>> --
>> 2.35.1
> 
> Hi Michael,
> This is already solved in ath-next and 5.18-rc1:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/wireless/ath/ath11k/qmi.c?h=v5.18-rc1&id=c9b41832dc080fa59bad597de94865b3ea2d5bab
> 

Hi Robert,

Ah ok, then I worked with the wrong tree (wireless-drivers-next).
Sorry for the noise.

regards,
Michael



  reply	other threads:[~2022-04-04 21:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 10:53 Michael Straube
2022-04-04 16:35 ` Robert Marko
2022-04-04 16:45   ` Michael Straube [this message]
2022-04-04 16:51     ` Kalle Valo

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=1bd30dce-4046-721b-2207-32ace83af441@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=ath11k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robert.marko@sartura.hr \
    /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

all inboxes | Powered by JetHome®