Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1854337pxa; Sat, 29 Aug 2020 05:46:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmnoccOMMWbVIZHTAd9cukjNPH9oHMAX4AJ73NPB/CGfzAUTZymPATJ51ynUu34tgwqPiz X-Received: by 2002:a17:906:f293:: with SMTP id gu19mr3344038ejb.209.1598705185818; Sat, 29 Aug 2020 05:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598705185; cv=none; d=google.com; s=arc-20160816; b=yJrSTKEdFqhvVV+9Pv5e6JcYTcc5N656ZAg/7mJjKm2wo3NlSOCDgzyDJ0WU90lOP4 kD4u3CnRO4ZMB/rxLdqZmfYK/6ni5uT3NtM4dkqHUQkjmB1QQINeltqRiPOdgODmb82i 7LVb14xrOdC0/QtdMBHggegtxvbrhiGzdc7cD5jpa6iZH4Yqhhy0BzfVh6FRFKr00NZn p032VIWDu4vhad5cET/TwbVT2F7ndwIB/Z7W/OOELi4SDKzNtYr4T6SRjFmCezzY2EJd WImRB0e2Rhwbuj6N1MjL6IvFIhzgpXphkAp67HatZa1X20mdjzrdEDjA6CdRigFzzZ0f McSg== 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=pew9HHNzD3JGp2NdMS1/YE9FfHCBGJEHz8R2l/nOkzE=; b=fOLIPFfzpCh3Z7YSCvhkXAe0iXZjdgmDvTnJomStvhmepJoM33lyqOVdYbKOW+K3Lh SIVXbrBmCb2oIUL8XWM7sqjMh55qC0aI60TpB0oPgaJwcGw113mFVCZwUbAnHJyS3gb7 57ZWABmpexkiIQUGmzJh5g1YCfNQt/pHrubssCrHKM79LUFaUfHNVPXSaJc8xwzR5P7F dlxsLOThgG4w1Sshb2CnwXe6B1mKWlcgxEVrA+aUs+g5erm8+oaRy14ewgX492tWw6CJ 77bHYEx2qSf6t4OZ48VXpMGI6pWxBzcnFMLXMJalJ7gh3H6JjfNkj7TKYKR7kvlM6xfx tFag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RWKq27Xb; 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 y23si1645596ejd.544.2020.08.29.05.46.03; Sat, 29 Aug 2020 05:46:25 -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=RWKq27Xb; 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 S1728142AbgH2Moc (ORCPT + 99 others); Sat, 29 Aug 2020 08:44:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:39794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728048AbgH2MoL (ORCPT ); Sat, 29 Aug 2020 08:44:11 -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 76B052100A; Sat, 29 Aug 2020 12:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598705050; bh=hFhp+uizbEAFtBnNMT6EokoqlaFF1omTuhXavhv/ZsA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RWKq27Xbf2Z6TfXr0KuFgwSkgQ99pY5H2+xrrkemPEfrvTpCs1q48bx+cuQ1ilASt b+8SlP5vMCqtq9FCpRj9l6ykpwwd1XHi1D4NhfXPaONx6ez7HvWUv7FSr/z4UToau2 yrDxBiXDjLtTV9VlJbHsRA4Fly39v2M2XAmtdiD0= From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] extcon: max77843: Return error code of extcon_dev_allocate() Date: Sat, 29 Aug 2020 14:43:55 +0200 Message-Id: <20200829124356.18148-3-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-max77843.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c index e6b50ca83008..8e6e97ec65a8 100644 --- a/drivers/extcon/extcon-max77843.c +++ b/drivers/extcon/extcon-max77843.c @@ -845,7 +845,7 @@ static int max77843_muic_probe(struct platform_device *pdev) max77843_extcon_cable); if (IS_ERR(info->edev)) { dev_err(&pdev->dev, "Failed to allocate memory for extcon\n"); - ret = -ENODEV; + ret = PTR_ERR(info->edev); goto err_muic_irq; } -- 2.17.1