From: Andrew Lunn <andrew@lunn.ch>
To: Colin King <colin.king@canonical.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Dan Murphy <dmurphy@ti.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] net: phy: dp83869: fix return of uninitialized variable ret
Date: Tue, 19 Nov 2019 00:29:12 +0100 [thread overview]
Message-ID: <20191118232912.GC15395@lunn.ch> (raw)
In-Reply-To: <20191118114835.39494-1-colin.king@canonical.com>
On Mon, Nov 18, 2019 at 11:48:35AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> In the case where the call to phy_interface_is_rgmii returns zero
> the variable ret is left uninitialized and this is returned at
> the end of the function dp83869_configure_rgmii. Fix this by
> returning 0 instead of the uninitialized value in ret.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Dan: phy_modify_mmd() could fail. You check the return value for
phy_read and phy_write, so it would be consistent to also check
Andrew
next prev parent reply other threads:[~2019-11-18 23:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-18 11:48 [PATCH][next] net: phy: dp83869: fix return of uninitialized variable ret Colin King
2019-11-18 23:29 ` Andrew Lunn [this message]
2019-11-19 17:27 ` Dan Murphy
2019-11-19 1:23 ` David Miller
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=20191118232912.GC15395@lunn.ch \
--to=andrew@lunn.ch \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=dmurphy@ti.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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