Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1854207pxa; Sat, 29 Aug 2020 05:46:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKbY2oruRl9wX7ASNLtpJI4cb0qW3PkErbbMYvAXmxer11DeY9MTcfwvhtoRzpUtBDzec/ X-Received: by 2002:a05:6402:615:: with SMTP id n21mr3116328edv.59.1598705168992; Sat, 29 Aug 2020 05:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598705168; cv=none; d=google.com; s=arc-20160816; b=nI1k4tS/Gu6pY3L9s2cHe5DUAcSrlYO5AMSCC977/Nb1Di0TQBJ80dTMViID4qut79 4K5xFzIUXg7nSXbaQIOsTEvJaryyH+1RGj5CkmWSj5oTk9BooxgZ4mdpX5JDtVXEq+52 Sv/Ev15fofI6iU8iICR0nrWprO8y+ijqgGOacnjdfTnm4uDogRVZbMfCiLZGRcAE1Z5Q yXQlPtGTQbJ31KJSqFnHRU+eaGs829N9gwrfOGSqqnaxJblk8LCi8CYLctS+oFGdbxF5 Z7ySntrOqPpzsRsfnlNawrv75ywuN1kGKuy8i5EzB8ML4L0+ViiDCrVZLuKAw0ubemCh iYbQ== 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=ffBZkXYYqxzl7usnbL0W8Scldw2IHIhsqwZw94peLAM=; b=tE9a0uv/scM7rARQoxmrMY06SIYq+6HhQ1JwzzTn4lp+IBnLOkcsy1aDxUcQK+VgAA J7ELz76g0pj8n3oaeI7t5eGiCaOc2jLMWDPXxJDnmaz9LEB/45APCrrAn+6CsAPuoKR1 Xc6rSkgn65tzr9hIkzwStp22rqL2B9Jr5GoJWcksWPpQMI4mhnmNx3SILyo3qBynKba6 IIW/EsqRBMWUdvEmrJGgpL3CX4vIkK+KRBXMuOlCESoVlFWdbUM66ySzJczVCmSO2vnm SuUrNLlA1QbKV02jkw7DSzZDhCur8to8bYrQ/rmti8QPEbDgJeNtS2FyfL1tNOWj/+tL a6bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LO+vstC2; 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 t26si1655028ejb.695.2020.08.29.05.45.46; Sat, 29 Aug 2020 05:46:08 -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=LO+vstC2; 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 S1728122AbgH2MoS (ORCPT + 99 others); Sat, 29 Aug 2020 08:44:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:39812 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728087AbgH2MoM (ORCPT ); Sat, 29 Aug 2020 08:44:12 -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 326BB20E65; Sat, 29 Aug 2020 12:44:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598705052; bh=/G2UXOE/MMY941KRkGwqlNScbXeadjs7wXNjjF8Qeh4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LO+vstC2h7JSoLzqOmKRrkrFnUd215a6qzIoCWzxoqmj8+NvYeXfyuQvjbd+AsKhD +qmgr2K69zaxdd/QCm7BF/YZgvAcS/eG+IotDHhTznJyweK4zi7tWyePiYyOLX4y8l ZckkRU7w+WtbqvRo787PgwJrP7c2WAFeQ1OnkZQ8= From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , linux-kernel@vger.kernel.org Subject: [PATCH 4/4] extcon: max8997: Return error code of extcon_dev_allocate() Date: Sat, 29 Aug 2020 14:43:56 +0200 Message-Id: <20200829124356.18148-4-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-max8997.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 172e116ac1ce..337b0eea4e62 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c @@ -674,7 +674,7 @@ static int max8997_muic_probe(struct platform_device *pdev) info->edev = devm_extcon_dev_allocate(&pdev->dev, max8997_extcon_cable); if (IS_ERR(info->edev)) { dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); - ret = -ENOMEM; + ret = PTR_ERR(info->edev); goto err_irq; } -- 2.17.1