From: Andrew Lunn <andrew@lunn.ch>
To: Ma Ke <make24@iscas.ac.cn>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, liujunliang_ljl@163.com,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net] net: usb: sr9700: fix uninitialized variable use in sr_mdio_read
Date: Thu, 25 Jul 2024 01:12:20 +0200 [thread overview]
Message-ID: <b944909b-1e75-4ec2-9c0e-e90269d7bf84@lunn.ch> (raw)
In-Reply-To: <20240724011554.1445989-1-make24@iscas.ac.cn>
On Wed, Jul 24, 2024 at 09:15:54AM +0800, Ma Ke wrote:
> It could lead to error happen because the variable res is not updated if
> the call to sr_share_read_word returns an error. In this particular case
> error code was returned and res stayed uninitialized.
>
> This can be avoided by checking the return value of sr_share_read_word
> and propagating the error if the read operation failed.
>
> Found by code review.
For V1, you were given the comment that there are other functions
which also suffer from this problem. You don't appear to of addressed
them in this patch, nor replied saying you won't because....
Please don't ignore reviewers.
Andrew
prev parent reply other threads:[~2024-07-24 23:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 1:15 [PATCH v2 net] net: usb: sr9700: fix uninitialized variable use in sr_mdio_read Ma Ke
2024-07-24 4:46 ` Greg KH
2024-07-24 23:12 ` Andrew Lunn [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=b944909b-1e75-4ec2-9c0e-e90269d7bf84@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=liujunliang_ljl@163.com \
--cc=make24@iscas.ac.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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