Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbbK3QjH (ORCPT ); Mon, 30 Nov 2015 11:39:07 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55165 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbbK3QjF (ORCPT ); Mon, 30 Nov 2015 11:39:05 -0500 Date: Mon, 30 Nov 2015 16:38:56 +0000 From: Mark Brown To: LABBE Corentin Cc: Kuninori Morimoto , alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, linux-kernel@vger.kernel.org Message-ID: <20151130163856.GC1929@sirena.org.uk> References: <1448455796-27315-1-git-send-email-clabbe.montjoie@gmail.com> <8737vtejg6.wl%kuninori.morimoto.gx@renesas.com> <20151126071715.GB28184@Red> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aNVYTE9V2LY2iLDz" Content-Disposition: inline In-Reply-To: <20151126071715.GB28184@Red> X-Cookie: A beer delayed is a beer denied. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] ASoC: rsnd: fix a possible NULL dereference X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1536 Lines: 45 --aNVYTE9V2LY2iLDz Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 26, 2015 at 08:17:15AM +0100, LABBE Corentin wrote: > On Wed, Nov 25, 2015 at 11:46:45PM +0000, Kuninori Morimoto wrote: > > > + of_data =3D of_device_get_match_data(dev); > > > + if (!of_data) > > > + return 1; > > return 1 ? > > You want to use -EINVAL ? > I do that Uwe Kleine-K=F6nig said to me to do in others thread: > https://lkml.org/lkml/2015/11/12/70 and https://lkml.org/lkml/2015/11/16/= 211 What error code to return is going to depend on the context - you need to look at what the caller is expecting and how it will handle the value returned. --aNVYTE9V2LY2iLDz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWXHufAAoJECTWi3JdVIfQ1PAH/2atEF0EmrSZKXVNjCbj5yo2 mrcD5+cBcAAzLgRNA4AFV2SKjHc0lXRdcOC2CIq8i6r22irl0GyeA6RV45DzbW7N TGi+lHbYJAfcryHP7XSQpzopMQD+QxYn+U2pVm1wBLec+r5ZzBDyfvrTBk8eGKwt Zcze/Uupik3v/QRn586HeWLHwofZPW6rFcKt9X/9j6zYbq0GFC9i0WWKh0uXXehQ +UAcj6Pz9vCKcWFy6OuA2wl77SpCsAruePHbvD/jXKjD1nIs3+uiUCul77W7o8JP 1EZHXbHp7YcobOtnBKk+yCLfT8KY3b8PbCo0nxCd4aFeU66aXofG68R3OMUGCPY= =moQz -----END PGP SIGNATURE----- --aNVYTE9V2LY2iLDz-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/