From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949AbbDMKiq (ORCPT ); Mon, 13 Apr 2015 06:38:46 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:38391 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753517AbbDMKim (ORCPT ); Mon, 13 Apr 2015 06:38:42 -0400 Date: Mon, 13 Apr 2015 11:38:31 +0100 From: Mark Brown To: "Jin, Yao" Cc: kbuild test robot , alsa-devel@alsa-project.org, Takashi Iwai , linux-kernel@vger.kernel.org, Liam Girdwood , kbuild-all@01.org Message-ID: <20150413103831.GE6023@sirena.org.uk> References: <201504130318.BufQJB8v%fengguang.wu@intel.com> <20150412190626.GA28170@athens.lkp.intel.com> <552B15EB.7030806@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4ag4KXF9gRq4fczJ" Content-Disposition: inline In-Reply-To: <552B15EB.7030806@linux.intel.com> X-Cookie: I've been there. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: fix ifnullfree.cocci warnings 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 --4ag4KXF9gRq4fczJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 13, 2015 at 09:03:39AM +0800, Jin, Yao wrote: > The NULL check here is to proivde the protection for current code and > future potential code. It's possible that in future some code may > change the pointer ipc->msg and the author may miss the kfree here. That's not the point - the point is that if it's ever valid to call kfree() then passing a null pointer in is fine. --4ag4KXF9gRq4fczJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVK5ynAAoJECTWi3JdVIfQeoQH/2CoQt3JX86Q1SUpxHBhJ/D1 ATt3kSNFLKan8++/3mCzVcsqLaj6I0onwxSarv0FZTFYqCrOeSJh6djhrVfzeDpV +I9yGh3/MVFqUMMr+d96/cvWuloAZB0EfeQ05aS7pF7Womh7BRuSIZekaYLUJkgl 1iHOwc7+wrAWNu5V43RY+LD1eGigY3sdZw20h1hsjGGRHqhfHeQsi5D/CIP8cNNc gNvK3Uw7YeH8ieGhzeyvfRMn/BC9Y/CDntnx/7F007iVp9EgPgeZDVah2QbXlEU6 5TUGn9C5StQU0f3rBba5BqApB/TJQnncjpKsKLB48ATC+zc18cKckIT1PbLTeoY= =bhxx -----END PGP SIGNATURE----- --4ag4KXF9gRq4fczJ--