Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1853797pxa; Sat, 29 Aug 2020 05:45:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1hsQMnjMuNzqLwIpQfwPzw91L/BQ7UpUW9T25KAIPOsGXtKPIS7VhDlbIPUi/VEOCrFst X-Received: by 2002:a17:906:600f:: with SMTP id o15mr3463388ejj.41.1598705112099; Sat, 29 Aug 2020 05:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598705112; cv=none; d=google.com; s=arc-20160816; b=ojXuqd8OrSRvD161qey1BgUYy4WlwJ6u2avYuw8vzhm4Qx74V2OKe7ngjoOKVi3nwM KjgPh1eUJzNxZiCw1gKFg1kn3ldfEeNj2gTi737GwopLIIDyh345Ixm78x4cyl8E9FvG NV1aUVr58KwJf81pBdx+UczEtcr8UsA5Uvi1h0KmPoW2ZtL6T1TLDizpGRKdtu/rk3Mj Xpo1vJJRklU69oXg72bcNwsCF7n/i9ud5WyDRx1uPt/H0XiijAYRw/66fgqT/0F9yOh6 vHyzGSkLMAUMuqHP79mca2vEGYdrF0OqyLLG891330Xv8VI6/My4bGgGlDVCJjUx7qgf sG6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=BonKkmfhbYLPz3Lhtdnfz48t55O7fhEu0qu5fm1ExFI=; b=OZSZD4hfRMyI0RkiAMvwzXp0UDIln14i9gJFwblPrEhlFYkMZtq0+ZdO5kgI9lSGvz cbcfq741Y4ujMRl3tfrlJbNH1pqlDQYaqUhwX/9J45oG/R5P1wsV6LVzaGPGmA71E5YD qxjeGVYO6mwqeDorQp6seSUFajPm3XcJDosgHgcEr+QMVdcN7kcWzHPh6/mczUJnfeco xSDhwe/eQ4+J3aOSyCiLnOrg2tSPmCI3e01GMua2bUSzxKw+uBmpd/MfJ0nZO5cqTEqS doEhETzm5Y1NlIpop8I/jDiVWe7L3HudbOV65b03H0UHn4tXuDPY5sLMzN1/xg4DP7S4 pDVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QwAMROvB; 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 x9si499056edv.540.2020.08.29.05.44.49; Sat, 29 Aug 2020 05:45:12 -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=QwAMROvB; 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 S1728040AbgH2MoK (ORCPT + 99 others); Sat, 29 Aug 2020 08:44:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:39736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727962AbgH2MoI (ORCPT ); Sat, 29 Aug 2020 08:44:08 -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 C061720CC7; Sat, 29 Aug 2020 12:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598705047; bh=gAK75cVH++fnacgNSJoBEvQ1QmxjOebkEJ7pvmm4vyw=; h=From:To:Subject:Date:From; b=QwAMROvBnor/5MCjASxb+QJKliHvgMRMziQJA7O8yDvUxu4kak3ziB1fxwTu022+u jZ0qY0f+1/jBHwo/9lxEKlBZsoTlHn+t6REH7uNoq/fas17BXM/yBhlrWfgKYaFX1c UFrySahsfczfoPix0RqFgDzDNKjbu55YTzuF+axY= From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] extcon: max14577: Return error code of extcon_dev_allocate() Date: Sat, 29 Aug 2020 14:43:53 +0200 Message-Id: <20200829124356.18148-1-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 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-max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index cc47d626095c..ace523924e58 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c @@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev) max14577_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