Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp113889ybg; Mon, 27 Jul 2020 17:22:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXoUxjLrNA6GMvl08nWrkFcJjN+HupQ1qZMfszO033SJ9P6eqQ0Wo72DxuWD7QuernIV6C X-Received: by 2002:aa7:d6cf:: with SMTP id x15mr23034507edr.164.1595895742355; Mon, 27 Jul 2020 17:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595895742; cv=none; d=google.com; s=arc-20160816; b=I7lCpaT9VGUdgxUfWTweATgzzmGt2noIJjXlTc3J4GWLxdddQyq1HFXAfV5foKWSW7 +byQibpshPe1Pkl3Iv6nHbsJxWY7DllC9ES5smU5wrG/VjHpmqVHn9SqgaPXWybkJjEC lH7Av4hypXLgSg5mXGxG1o38iGODRYiHe+uftSd+RrYHkEcGKi2vlqTR9DvacAmKwO64 YaXx1ITr9sF1pggCpYP2m87ajEgR5V+I/jsg6EKf2je8nNWENGMAg2H9D1QYzMnV/R6a nGlJxvekv3rokzxAf7q+KdiIDli8N7stTYD7aTomm+9rjconaHIOCH0wVx/Xv/8zwIOI ksSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=eQ85fRjuenJqiBbXx8MscfCpcrGaQlx2sn2Y5LpgOaQ=; b=b/76GOwpZaDK+GyqpyKTR+TUoJVsM2R7Ew6osUtHmiQeeXMUi/H2GJTdr1PXZWyP2b Os7OiBPJIcJtVk4nZaJeA+/zXo4ITt+EX8LEeJHcAPhV9Owr4fudhCC76ns7g2xOGNuZ 8JgpfLMl4u6ABpN6XiCd3Hk8XI9UsailnPze5vGweEioBGTF3LVCxnRh7k0CbP2F7Uq+ Ym6eAXwKTybl+tBUmzhB1Q9oFWi8zUXhN7eWg2eb+P4nlvwh/w3EYu7oHBTaWG3k6yPV ZKrG4lScBiwxkeA4OwaMgTdT2JcDXEtE8zXoYWjiveVveiWnwE7VLUdcZglJ+rXGQEHo MaPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QYCMeK0M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si6966536eds.574.2020.07.27.17.22.00; Mon, 27 Jul 2020 17:22:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QYCMeK0M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726946AbgG1ATk (ORCPT + 99 others); Mon, 27 Jul 2020 20:19:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:49558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgG1ATj (ORCPT ); Mon, 27 Jul 2020 20:19:39 -0400 Received: from earth.universe (unknown [185.213.155.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 12FA420786; Tue, 28 Jul 2020 00:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595895579; bh=vsiTrIcZ56SSOxyiEUoEwv+DpHiWDpQ4NqHzGqLqy3o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QYCMeK0MW7pG2TuN8wCprFNbGTxiU0frezxvvY/Brck/TqRWqtKMY6p6ZDqYHgpzm UYDLLpsfd6AVXo63eI70TvuKt7nSTWho9ggj2+P/cUKNT+sk7JbB0rWgFbmRyVjyhw Gd5MZU0gk9jAAI7JRaR06EVHaKjML1OMPRUni7OQ= Received: by earth.universe (Postfix, from userid 1000) id 4F75B3C0B87; Tue, 28 Jul 2020 02:19:37 +0200 (CEST) Date: Tue, 28 Jul 2020 02:19:37 +0200 From: Sebastian Reichel To: Peng Fan Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Tiezhu Yang Subject: Re: [PATCH] power: supply: rt5033_battery: Fix error code in rt5033_battery_probe() Message-ID: <20200728001937.vtvneczrskc6cs4u@earth.universe> References: <1593680332-31884-1-git-send-email-fanpeng@loongson.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7od7w7hhl7sikvqk" Content-Disposition: inline In-Reply-To: <1593680332-31884-1-git-send-email-fanpeng@loongson.cn> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7od7w7hhl7sikvqk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Jul 02, 2020 at 04:58:52PM +0800, Peng Fan wrote: > In the function rt5033_battery_probe(), it should return -ENOMEM > instead of -EINVAL when call function devm_kzalloc() failed. >=20 > Signed-off-by: Peng Fan > --- Thanks, queued. -- Sebastian > drivers/power/supply/rt5033_battery.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply= /rt5033_battery.c > index d8667a9..f330452 100644 > --- a/drivers/power/supply/rt5033_battery.c > +++ b/drivers/power/supply/rt5033_battery.c > @@ -125,7 +125,7 @@ static int rt5033_battery_probe(struct i2c_client *cl= ient, > =20 > battery =3D devm_kzalloc(&client->dev, sizeof(*battery), GFP_KERNEL); > if (!battery) > - return -EINVAL; > + return -ENOMEM; > =20 > battery->client =3D client; > battery->regmap =3D devm_regmap_init_i2c(client, > --=20 > 2.1.0 >=20 --7od7w7hhl7sikvqk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl8fbxkACgkQ2O7X88g7 +pog2A/8DVU5QYgx87Or/U3pWkw+/hgTRmm5UVuocenyM22SgCXnd+SHVLLpF12P NinS8uhYlufo7HRznagwQr1t2uy2AT8IpQ13VpwjcidHZYbCqudJtUNL9gJ0VYVO OKmwlQeROyXnjqiM5dKA48TXcFvXFmzsg9vOphwsN+uY0DsoZOimHmGHc2XRZ+dc x3HmlBNX9z8C+y1JoiP/b7H8oXXUhxXnZZ0Ogs04jmlE38CSClPwAhVvcd8umqyZ sZgnGlaG2uCV8/ZvSvstBzEJAwaP23VLEZoqccs+9v3nI97JVml0oAP1U8yq7Xah XF1h8bxRsxzxZ2cq1htGlXy7TlwNmHqgBiskM+AyuHOOViKyGJR5ug/RCUEGc5y+ JT39Yk6rhrowEIZlsAaJGOWGeuXAHO1UwE1bg6nZDazRPZ9GExk9bmu7vrhnLODS CHnnaMh2oK+KW2oVenfm1y7Du1GAa3jiDCLTXXFV6ZACQu9jh7N55BzdfdnvmInR NzHV9+55pcbk9U/blUGn4A4LTzBdptv6z/Y42URoghn2ks4dxNlhtwKCWWIVEm3p uc24pzQJJp4YpexNlZr+giQ/jD6muqgUdS5lml8rPTw7Dui5Ya9Z4Q8YHNfhnzit ZwZfH8dlK7Z8uoKco4TeafPi91n25hyPgx//TgqyhMNvBCYaRvE= =xY1+ -----END PGP SIGNATURE----- --7od7w7hhl7sikvqk--