Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1853944pxa; Sat, 29 Aug 2020 05:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn75sbJnVI7rHbEvPCJG5WcsPeR2TuhQCIdhyjdY2bko1XNX4X10HTMcz5Xn3SUeMpXgkG X-Received: by 2002:a17:906:1604:: with SMTP id m4mr3319669ejd.6.1598705131805; Sat, 29 Aug 2020 05:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598705131; cv=none; d=google.com; s=arc-20160816; b=YclxNYKd20S9Zekq3oRP5qNwoUFlU5r8FZIsNi9HwF2I4/MlkMrcbFb5v6NLazr8xr jxA8TSM9vLFSr6KOWMsboFWXudxl0i4CZ9W0v6fwtoA1ZfEZOCkGRCfbEUaZDpcfECHf /vuMmrJRrjIMwb0gAKjm9T22diUY3Re8wpPQuZfAvYG8cqJcIyAmzPNPTVnOmknT2wh2 BUZbd9mqUL8vXZhIZQ0zCAx2JuO1AQTgN+oR27ZXMjQ+VG8FxQ3t3ZxRN9M30t9LdSTX NP9AJgLFZlR4FRuqIWHjDGlOGwkLsrV2SDrNvC3X72ooxGJ/OsxHxK1h5blNWOgJM5HE YQ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=4T2xYuZx94losCKsJz9eoTKTIa4k9pVZqbSxye9wp5E=; b=n2cz+XFjIVWc9Vmmm7f36gz/LGNpJny8xCvEQttBSJrSf3j32td40a94mcZyTdS1tR fktRtlL8B9f8afpSHHiCnS/EPdXKt0Oj1Sn/P1KxCGp0G0GyglS36z/BwMO5i6PHD9kP ZRyaau8MPo4oO1eUMDk4CTwU4WQGNkw4lfo0gGWAor9t5bcOhS4LyI1Q0kw0lR+5FbDr rroVMNHtzTmVSHzYdxzAtsAwo/8fugT79YKNdrHrpQsPkpEyeUVfM/2GDJ26VU7NiNAH gDA1dQWY9Tefm4YD6VuFjx6xM1BZjvGvJjPfY5HKs1v0osP8yxHc2RJjHoDBscwJElfd EMjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Iiu9f86X; 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 p6si1621515ejj.300.2020.08.29.05.45.09; Sat, 29 Aug 2020 05:45:31 -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=Iiu9f86X; 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 S1728104AbgH2MoO (ORCPT + 99 others); Sat, 29 Aug 2020 08:44:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:39756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727997AbgH2MoJ (ORCPT ); Sat, 29 Aug 2020 08:44:09 -0400 Received: from localhost.localdomain (unknown [194.230.155.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98E0520EDD; Sat, 29 Aug 2020 12:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598705049; bh=peGWSx6YXMRar3ybnA8IvphCc/WLWnFCxTQJJp1BrNQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Iiu9f86X31duBz57vlOPKFXZGItXzKvK5BoXDr7aCwQcThEUToyW8tvqF3pfvjor8 3JNewNWJ7+QMTGQnlwWYRj4kvazBucm7Mma8hXQyaDabtQOwDr6QqYFDkKzWUv7J1Z PsTNiIvnpDXc2j1D8Z5j7HDajU7/iIItBJgYCnu0= From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] extcon: max77693: Return error code of extcon_dev_allocate() Date: Sat, 29 Aug 2020 14:43:54 +0200 Message-Id: <20200829124356.18148-2-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829124356.18148-1-krzk@kernel.org> References: <20200829124356.18148-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org devm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM. Signed-off-by: Krzysztof Kozlowski --- drivers/extcon/extcon-max77693.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 32fc5a66ffa9..4a410fd2ea9a 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -1157,7 +1157,7 @@ static int max77693_muic_probe(struct platform_device *pdev) max77693_extcon_cable); if (IS_ERR(info->edev)) { dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); - return -ENOMEM; + return PTR_ERR(info->edev); } ret = devm_extcon_dev_register(&pdev->dev, info->edev); -- 2.17.1