From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Subject: Re: [PATCH] i2c-s3c2410: Fix potential NULL pointer dereference Date: Sat, 6 Oct 2012 15:37:24 +0200 Message-ID: <20121006133724.GB25123@pengutronix.de> References: <1347958128-13146-1-git-send-email-sachin.kamat@linaro.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Return-path: Content-Disposition: inline In-Reply-To: <1347958128-13146-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sachin Kamat Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Grant Likely , Rob Herring List-Id: devicetree@vger.kernel.org --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 18, 2012 at 02:18:48PM +0530, Sachin Kamat wrote: > of_match_node() returns NULL if a device_node does not have > a matching of_match structure. Thus the return value needs to be > checked for NULL to avoid NULL pointer dereferencing. I am missing how the driver can be matched to the device if there is no fitting device node? --=20 Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlBwNBQACgkQD27XaX1/VRtOoACgxqoLSJZyRlkLQsLVnqS50MyM /vgAoKeajzgnavJuq2UqUL5S8myj/DQ6 =e9Lz -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--