From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 25 May 2020 13:59:23 -0400 Subject: [PATCH] phy: Fix possible NULL pointer deference In-Reply-To: <20200520170541.13312-1-vigneshr@ti.com> References: <20200520170541.13312-1-vigneshr@ti.com> Message-ID: <20200525175923.GC12717@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, May 20, 2020 at 10:35:41PM +0530, Vignesh Raghavendra wrote: > It is possible that users of generic_phy_*() APIs may pass a valid > struct phy pointer but phy->dev can be NULL, leading to NULL pointer > deference in phy_dev_ops(). > > So call generic_phy_valid() to verify that phy and phy->dev are both > valid. > > Signed-off-by: Vignesh Raghavendra Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: