Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3924732pxj; Mon, 21 Jun 2021 09:29:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2ZgayTHajwosbpX0jj0tM0UKkBJ8SHsxmjiqypPJkyrBuhUxBTxbWg35xVKuc+w7vkjVd X-Received: by 2002:a05:6638:22b8:: with SMTP id z24mr17728618jas.45.1624292974556; Mon, 21 Jun 2021 09:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292974; cv=none; d=google.com; s=arc-20160816; b=OQ5MkRHkxM/aBxqZVLrrohWE/e7BHDBSkRpqczmlOs7yzJv1um28+Brsy+xwICdogK ubIj1j0S9NFQUMv48KUims/Y44HeVp+p1XrC3Hdk4sDKdnHnzveHqh9M4jVE9bSOkMXm ZfM8i4KzaeOC64Gj6xYahm1IY/yX9up50TYSw7OmjY3AtLXMl8Leuigwo7qPF8EB6ixq Dx+vbAy+ouB9JUCQVHIJwKoNOESCyHMqvl0OAzAed+fUG+ms/QR/WDVKwoUtbFMowEcT tuKklpcjv1IuGzPamcwaAq0MKgvPpWby1X+d6CKCSL9j57KFQJssOAU3Yx2PPGgNmNKi 8fPQ== 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=AFXqMtbGxFmMRBSNxKg78Agqcgbs85hzEtNEyhCFCyYFGBigQGpEu4b1brV96yT79N d2N8cZiVZ2L9RB8AJEn07QPP3M83DHxOdgqA5pEZMxBLmkdDkv4La7ky3EjfQYlSxwfA 04v4BryPoP1osjSq3pfdF/HkQZZ48sU9RaU8gQSDzE6LH1RylwmPT4gJAI+dYmzRd67s Pt51waAOJ4oB9Wp04jcp9BQsBjj1C7EZwqzrVukuXrGQP8fohwM5LbNZWC3k0g7l2Sey Yj+sKw3eiwHwSqHY7A+QuxybvLsJ3ekeAlHHKOxXXyLbiB/jdJCpuB47YFxTGRByJhsj 9Dgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ixSzxK8m; 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 m1si11819360ilj.142.2021.06.21.09.29.22; Mon, 21 Jun 2021 09:29:34 -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=ixSzxK8m; 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 S232300AbhFUQbI (ORCPT + 99 others); Mon, 21 Jun 2021 12:31:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:48354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232318AbhFUQ3N (ORCPT ); Mon, 21 Jun 2021 12:29:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E138861353; Mon, 21 Jun 2021 16:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292640; bh=UkDxa+fl9rFOLo1Io0faeV/fqWbjlXYKuHxxv5ocWTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ixSzxK8mzy0Oo6Xuf5q+FbMbPNWHWSF19STfZ5ZMiNO6ZUsbC+IoG9RxFwR8RGkBK b47Hcj9gxRGKSC8tZXbaR+mqAwaY8wIXrizjIGH54St3dsNrDAQa83wtbiSAUe3PEc wvMrUZ9+oKTApxCzKEh0+D1+JzvvYV095IkO0+vQ= 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.10 074/146] regulator: cros-ec: Fix error code in dev_err message Date: Mon, 21 Jun 2021 18:15:04 +0200 Message-Id: <20210621154915.604917424@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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