Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1720233ybm; Thu, 23 May 2019 05:51:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqG2XcT3bq6RxzYQFpSoQN6qUdm9fZAaxGaJNpyH/cAwy0xUTBfpEW2061FqtRt1mWf8i7 X-Received: by 2002:a17:90a:2042:: with SMTP id n60mr929251pjc.8.1558615919200; Thu, 23 May 2019 05:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558615919; cv=none; d=google.com; s=arc-20160816; b=x2i9POJJI3WOxu0xoMWYa6Fsk/Nf1Mg81+5IMiOwJCZMTJlx0dICpTohkKhCMbkh+3 DYFxnLYEemQAwMlNVbpAH/884Fyn611+/rDWQW8S70iwEYIsV4D/BtjKCPzjsBqR3bjW S3i8XybmbqIFdgUP5wFhcCTLeVqEdsityCIEUNoNDHWH7W8/pfAubxp5o20vDW4NnN5t UxHSVjwBlFpHYZ3SuN8GGltTRfx6408Ms6RqvqbpGJ2YI7Mcmpsr2TMAbpKePRFgwjoa xM7NfSgjva9d45PrH2CfLxH+0v2lsLSsvvV2yz5+46lKcXMtqCSJ1XBatLstVvSn2RV+ 5GJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BG+Y2MeR6wORJ2DfSUicFVoQ2Rzp3QQEe4oVffmCMQw=; b=hN9NWvvCowC0SwAxH1FZeny7IH9CrEyKaCHWBIjOiLk/NrO5Ji/erIPQPEWHPpqMYs kbpc56Lwe/3prrAsHYftP12Cc7VI0gCxHXHcTOPTjthSX56ZS93yqGm2gQtRhuYspwT3 yk1UsBoiovCJulVZEEybVP+u/21Nm69CmvT7ggjPa9MZN0ldstiM37R4qVgtCb2EN3r1 hAt/TdJzK5OLzBtA+a1D1QOfSWS35IKVf8gRMwa3Ky8Q2bXQH78xHAjeX3MDL3bgXFNu 47JthsdRw8vzi+WwAL2HibB2Ym3miq2dGZz80IJYQmH2DdphC5eBCkKtCUFIqLjmqbVx Lo+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 96si28746566ple.289.2019.05.23.05.51.44; Thu, 23 May 2019 05:51:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730611AbfEWMuP (ORCPT + 99 others); Thu, 23 May 2019 08:50:15 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59581 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbfEWMuO (ORCPT ); Thu, 23 May 2019 08:50:14 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id A0C3D80375; Thu, 23 May 2019 14:50:02 +0200 (CEST) Date: Thu, 23 May 2019 14:50:12 +0200 From: Pavel Machek To: Dan Murphy Cc: jacek.anaszewski@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, lee.jones@linaro.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v4 6/6] leds: lm36274: Introduce the TI LM36274 LED driver Message-ID: <20190523125012.GB20354@amd> References: <20190522192733.13422-1-dmurphy@ti.com> <20190522192733.13422-7-dmurphy@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UHN/qo2QbUvPLonB" Content-Disposition: inline In-Reply-To: <20190522192733.13422-7-dmurphy@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --UHN/qo2QbUvPLonB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > +++ b/drivers/leds/leds-lm36274.c > +static int lm36274_parse_dt(struct lm36274 *lm36274_data) > +{ > + struct fwnode_handle *child =3D NULL; > + char label[LED_MAX_NAME_SIZE]; > + struct device *dev =3D &lm36274_data->pdev->dev; > + const char *name; > + int child_cnt; > + int ret =3D -EINVAL; > + > + /* There should only be 1 node */ > + child_cnt =3D device_get_child_node_count(dev); > + if (child_cnt !=3D 1) > + return ret; I'd do explicit "return -EINVAL" here. > +static int lm36274_probe(struct platform_device *pdev) > +{ > + struct ti_lmu *lmu =3D dev_get_drvdata(pdev->dev.parent); > + struct lm36274 *lm36274_data; > + int ret; > + > + lm36274_data =3D devm_kzalloc(&pdev->dev, sizeof(*lm36274_data), > + GFP_KERNEL); > + if (!lm36274_data) { > + ret =3D -ENOMEM; > + return ret; > + } And certainly do "return -ENOMEM" explicitly here. Acked-by: Pavel Machek Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --UHN/qo2QbUvPLonB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlzmlwQACgkQMOfwapXb+vKGTQCfXMX0uKvUxpwhTf9eLraj5005 zNIAn05ddGsfmRuYiC1Yw79dIQwKFUNn =UqIj -----END PGP SIGNATURE----- --UHN/qo2QbUvPLonB--