Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753088AbcD0HVv (ORCPT ); Wed, 27 Apr 2016 03:21:51 -0400 Received: from mga02.intel.com ([134.134.136.20]:5248 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbcD0HVt (ORCPT ); Wed, 27 Apr 2016 03:21:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,540,1455004800"; d="asc'?scan'208";a="967405415" From: Felipe Balbi To: Jisheng Zhang , mathias.nyman@linux.intel.com Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, yendapally.reddy@broadcom.com Subject: Re: [RESEND PATCH v2 5/7] usb: xhci: plat: Remove checks for optional clock in error/remove path In-Reply-To: <20160427143343.6510ff57@xhacker> References: <1461675460-2295-1-git-send-email-jszhang@marvell.com> <1461675460-2295-6-git-send-email-jszhang@marvell.com> <87h9enpqdb.fsf@intel.com> <20160427143343.6510ff57@xhacker> User-Agent: Notmuch/0.21+96~g9bbc54b (http://notmuchmail.org) Emacs/25.0.90.3 (x86_64-pc-linux-gnu) Date: Wed, 27 Apr 2016 10:19:32 +0300 Message-ID: <877ffjo6wr.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1679 Lines: 50 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Jisheng Zhang writes: > Dear Felipe, > > On Wed, 27 Apr 2016 08:33:52 +0300 Felipe Balbi wrote: > >> Jisheng Zhang writes: >> > Commit 63589e92c2d9 ("clk: Ignore error and NULL pointers passed to >> > clk_{unprepare, disable}()") allows NULL or error pointer to be passed >> > unconditionally. >> > >> > This patch is to simplify probe error and remove code paths.=20=20 >>=20 >> this seems wrong to me. xhci->clk isn't initialized to NULL, it's either >> initialized to a valid struct clk * or some ERR_PTR() value. > > Commit 63589e92c2d9 could also ignore error value ;) oh okay, thanks for that. That's, IMHO, quite dangerous ;-) =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXIGgFAAoJEIaOsuA1yqREeRAP/imly5fiqDZ0h3Tt1/uWC2hu O9g7lHEYex3KBloKpISpNUdN4Cv5o5bt8aIy9pUMBmDs2W5CfrIWbRskn+2+nd5P CMgo8tgMR85IyWsaaO5bNZW2hLQCmclPOlADN24fPn9HlTNk2s/ZU5q10IvXU47l yVKzPyAh/mAc35rltPnf3NOJM3L3squUlhqPG4sRKVjz2cBpzKEwEeccyL8vblZg /jC2z4X3SHyAK+e1qKclmaE8eTeXZYTqGjM/3i6y6apUIrrWM0BSwfIitgaC1HkV Pu1IIwkiIJvDSbwlgbb2ilBsHDZbKodfXPD5GmMfS1F2O8dLE3TNJkgzRHBDwOBd wqgz9jemCRAX1rJroChL6rYEU2Rb2N0JOx5AHd6IvYPxpUo2+l9lempUgrztbC1b hVQ2X18DSN8DXlMWNfHQbbkSgQE/iMO+VzO1x1HYECDFRcqcj3Emn31L+UCvY4lE r2uegIpwOThVbXgsPjQaxbBlXGdEjXkQ2oF8xOVFUXhzTFNNdBoOHIA28Tra1gJw 2kQfPdHONtgDk5lRXo9jjLaHQlpmL7Hz03TU98iwRdkevvOgBg+UUSPsCCehsRfe /xHlWDbdk/KplJT9jmO17Lpond4YfkH4pB+iL5FgxqzXqBs5hdOIf0xMPfCYEPgb 5D3KaAfiYdkcE0LEXX5Y =pUiI -----END PGP SIGNATURE----- --=-=-=--