Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751592AbdF1TPe (ORCPT ); Wed, 28 Jun 2017 15:15:34 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:59412 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515AbdF1TP2 (ORCPT ); Wed, 28 Jun 2017 15:15:28 -0400 Date: Wed, 28 Jun 2017 20:14:52 +0100 From: Mark Brown To: Arvind Yadav Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20170628191452.vjylivjghzzpk3g7@sirena.org.uk> References: <36969f0624050d0ca6262e79bf4935698d063d84.1497950982.git.arvind.yadav.cs@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5j2nuyw7nm5ikvkw" Content-Disposition: inline In-Reply-To: <36969f0624050d0ca6262e79bf4935698d063d84.1497950982.git.arvind.yadav.cs@gmail.com> X-Cookie: 667: User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: 94.197.121.86 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] spi: loopback-test: Fix kfree() NULL pointer error. X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 894 Lines: 27 --5j2nuyw7nm5ikvkw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 20, 2017 at 03:00:53PM +0530, Arvind Yadav wrote: > Here, rx/tx allocation can fail. So avoid kvfree call > with NULL pointer. It's not an error to free NULL, the APIs will just ignore the value. --5j2nuyw7nm5ikvkw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAllUACsACgkQJNaLcl1U h9BsXgf/XZdf4j/HZlLzazj5OAz1NmbvJen7zK4gYvtcZJweV6+3ZKDP+NB63OIJ 7HF8IB51eWm3ZsyEAMMgVxA+MfC56b9Qwejsqc9USFZr+8f30W/xZcGWjS5X+8BQ uQVW0rDVOpHkVSzzBb2OwDCf+8cqU3r42k6hEbFWg20tAYgMg2Bm+sKocInCvPt5 QCu4+J57M1Ix3y+b0Ul6VcRteEItKhqYqRG7j/hn5tg/ur9NR6kQbCUYKFnH2W8l 3AwWCpDBBRjKx/BnUgcsIHOn72Tk0u1LAMphsIGlFwqSyhafXATbCEoK7AcOYYX2 pzP6C4KXiwv3UAM64O7N0A90GkFskQ== =gd4b -----END PGP SIGNATURE----- --5j2nuyw7nm5ikvkw--