From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDF2FC433EF for ; Tue, 12 Jul 2022 10:49:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E936840C1; Tue, 12 Jul 2022 12:49:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ApTUAwVE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 93C6E840E6; Tue, 12 Jul 2022 12:49:38 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3EBAD840BE for ; Tue, 12 Jul 2022 12:49:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 826BB61879; Tue, 12 Jul 2022 10:49:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E33BAC3411C; Tue, 12 Jul 2022 10:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657622973; bh=ypdeXl9Kx1yu40IAAU5KJskRE7B9Y0AZXp02G/T1tD8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ApTUAwVEQmgTUAU7vc+iVbh9PHIn6Qs7Z/nkLpFm5Kh9vUl1lGHmQkDEGrBvJBpNS L3ZB2TvZgGpK9Y8EAs+7/jRMx1Okw1DTzjQr1fhqBdh5sBQQQnEPBKUdFZ9le2kjEC djNDYIIY8eqtf6zKFmMD4VIDiRx2DL/UA8QD3hTU9iAu1x1xz+aa1xV2MRv0Csce/z RKYiLx95FGbGtZmKsWBl157vWqN9tPFsJAj/252DatnrdyTnrOOeu9+Zhd7KYbnwCE jPnz/Uj/ZbrpLIV6TYaKW45+/Z1GzzYVw849RNzhOo0JJREzvhQ7x1G0XREtYo1m5r Dn5n1PnXrJevg== Date: Tue, 12 Jul 2022 12:49:27 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Heinrich Schuchardt Cc: Joe Hershberger , Ramon Fried , T Karthik Reddy , Vladimir Oltean , Ariel D'Alessandro , Michal Simek , Nate Drude , u-boot@lists.denx.de Subject: Re: [PATCH 1/1] net: phy: possible NULL dereference in fixed_phy_create() Message-ID: <20220712124927.55bb49bf@thinkpad> In-Reply-To: <20220711174013.116975-1-heinrich.schuchardt@canonical.com> References: <20220711174013.116975-1-heinrich.schuchardt@canonical.com> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Mon, 11 Jul 2022 19:40:13 +0200 Heinrich Schuchardt wrote: > We check if phydev is NULL. Only but if it is non-NULL we set one > component of phydev. But even if it is NULL we set another. We should not > dereference NULL in either case. >=20 > Fixes: e24b58f5ed4f ("net: phy: don't require PHY interface mode during P= HY creation") > Signed-off-by: Heinrich Schuchardt Reviewed-by: Marek Beh=C3=BAn