Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3940296pxj; Mon, 21 Jun 2021 09:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy193aB4uSZHjZylObqKiYsATrWFWl/YlxbPV6+JRTLpDk7SmUaCfJHR49dXLsfb3YatLkx X-Received: by 2002:a5e:9306:: with SMTP id k6mr21586733iom.157.1624294162524; Mon, 21 Jun 2021 09:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294162; cv=none; d=google.com; s=arc-20160816; b=pALy7fNxXONbJ8PaRmua7Y6WijDVxb6xzIfxYAmQpzSIHvJurWNFWq8l8fBdJIOkfr 5xQNHBW0foVYPlNnjgwwQCXKHy/FNhbktHFnvJiC679xBG3S9Gl5a2kdxOkiwtedXetc qeaLMHcxp4UJUyVqBDjZLHG3MizuQZTlzwjdD87D/2lGMHEzCfksrc6Z+rJiX9oWilrC M1XY5opA7qHwKWdNp6JWckSU0mYK4h3DJkYSEMpVU97ADJqMjVVrfl729lkPhOX7G+TK KjioQDhbKLkKYw+w+8JreRqeRvj2XuHeYH0EHso78efC8Hwo+gypZKkePHZUJTxUBski 9Qpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Td7Tdd9wscrVsNFzd7U8vG5E4GyDhIbC8SN8s1NrBac=; b=hRoq3Bb9qJvwI/+8Nc0HqtbC+bjf+UCpqOirtpt7Xf/U6bUkMPVxxOlqWlTM6VCdbn cla+yS+lzFOqbl1NllW+ZU7oTer6X7r5LZNLZtMZC/CyM+YOwIdU0lU2pPw3iN8LO1kR 6Fa77JjwfnkViUIFOewnDOVkBefGhGwKIQdns4jWWBOPGKPPaPXvcDiDHVLwtlkGQZHo m3yWqyAmW/0qC7+3ZoPIF8eM8FP2I79QtOMxHjFMFXl47mp/VtBC/+wSWsN52BihEGBL SS8d9jQf8QntJguOD65YlrLLnH28S6ejeKCVMSDJ3KmS8DRx9HtGsKzkL9rNPCdAsW2L URoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=K9uPjHs9; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si2410601ilv.63.2021.06.21.09.49.10; Mon, 21 Jun 2021 09:49: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=@linuxfoundation.org header.s=korg header.b=K9uPjHs9; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbhFUQs6 (ORCPT + 99 others); Mon, 21 Jun 2021 12:48:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:33622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233080AbhFUQmA (ORCPT ); Mon, 21 Jun 2021 12:42:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C21ED613FD; Mon, 21 Jun 2021 16:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293076; bh=UkDxa+fl9rFOLo1Io0faeV/fqWbjlXYKuHxxv5ocWTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K9uPjHs9cXK3PEoIbJWjQZpFGmzlPGUJZG+rrSQxRQiRdztsfwPotrqgj7ylkDf+0 2ISCaGz8puZsRzJ9QAIsj7Gs1ccK/mQV4YkVQlhhar3jYJkfEa3caQ0JdiWTl+Kxri izfYRFNrPBeWdpPZs+pAW5OLTvHnLNFis5KHA0gg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Axel Lin , Mark Brown , Sasha Levin Subject: [PATCH 5.12 088/178] regulator: cros-ec: Fix error code in dev_err message Date: Mon, 21 Jun 2021 18:15:02 +0200 Message-Id: <20210621154925.674280513@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Axel Lin [ Upstream commit 3d681804efcb6e5d8089a433402e19179347d7ae ] Show proper error code instead of 0. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210512075824.620580-1-axel.lin@ingics.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/cros-ec-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c index eb3fc1db4edc..c4754f3cf233 100644 --- a/drivers/regulator/cros-ec-regulator.c +++ b/drivers/regulator/cros-ec-regulator.c @@ -225,8 +225,9 @@ static int cros_ec_regulator_probe(struct platform_device *pdev) drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg); if (IS_ERR(drvdata->dev)) { + ret = PTR_ERR(drvdata->dev); dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); - return PTR_ERR(drvdata->dev); + return ret; } platform_set_drvdata(pdev, drvdata); -- 2.30.2