Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1876485pxa; Sat, 29 Aug 2020 06:27:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK1OZe4oMBOOn4isQ0H8+KiNp+Z8u730YC6IdrwXE/+2H8+yNP1eDfXD19fxEbtZzsW1qk X-Received: by 2002:a17:906:d18c:: with SMTP id c12mr3438652ejz.151.1598707648852; Sat, 29 Aug 2020 06:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598707648; cv=none; d=google.com; s=arc-20160816; b=KY0uZ5PpL1IBV9Lbem6EvAJV6xoG1gS4a+GqNH0YzhEp6ndddhO/BPjdwtTFMK70wK AOkdC0FzzRtDs9ILJfFTQ4u0ZRze9EyOrduIcv8nbc+Bk8rtj1aPmV9LNQzZUXJxgzft pqhFAJXr5wrlD67DWMYgQZ+uMIY6AJir4XyUAS8rblLUgTiLCFCszw34xFQmRT1xVgWt Mc5HrHGRmtDG2k/fo90m8XhMNq4aFKi+8kxUNXPI8nXCwWadt96jVgUgEyiRGS6IS/QM c3+WsXKTfPgAa7Ky4eeJXoMhXkTJL5IL+/WNXfqzTj3486VyIk5XTFT1LgA84/xPqVk0 hyzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jd6utHzUATdefAWfL3Hyp21+FClOOcDyLa6+m9GpY5s=; b=cdGhv1rDDs8ACxdTLHJb64sp2wnTv8EJ68KbZQgN3SWyvWKhRCLVbV04umQucGeVe6 h8r7tsWq3zYFLUtneeVCxLkK2RHVwtBGd8y6swh4a+pjxOJMiK5/My/aw2ZbxnUPVp94 bC7ymU8rakJQs6/6P9B44F5aYbPrEQR6NMmx0qy8EbGd5U6hxhBPVmtiefPJskowiOxa 6O92Jq8rkSypfRrUuLhO+4oq839zmgivlEizMRvZstE0JwIDpMM+Bcbn4ypuPXGz4Ru/ bfcFft+uInGGhFA5NKfwsuEIhrPWh98Q1ThrDV2HWdsBd4etrdQICDh2qV3ocGMP/TkB 6QVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DEcvNkMs; 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 n12si1758025ejz.288.2020.08.29.06.27.05; Sat, 29 Aug 2020 06:27:28 -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=DEcvNkMs; 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 S1728180AbgH2NYB (ORCPT + 99 others); Sat, 29 Aug 2020 09:24:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:56750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728183AbgH2NLF (ORCPT ); Sat, 29 Aug 2020 09:11:05 -0400 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 6CB33207DA for ; Sat, 29 Aug 2020 13:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598706664; bh=qgbRr1D/arlnfoTrQnkUBuso7pgSb3HiLe64ZclBGLY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DEcvNkMsPXQhAGgKmfecBXGW4VpE7h0XPCy81/q35ylDDai3M/nQAZhNGt7CyuHte krmcQhTVlbo47xxaZGApBHjwGkA3PGraaRwjIUR6ntxlDgzx/0V5lvDOZXghxVxoED QrLMLQZPEZnFZ/ZydGg8TLxLWYjlBvvb/xm6rqp8= Received: by mail-lj1-f170.google.com with SMTP id r13so1873202ljm.0 for ; Sat, 29 Aug 2020 06:11:04 -0700 (PDT) X-Gm-Message-State: AOAM530yRrjnSYIudupcubpCoAMeMLgV8pr/fc5AjHHfUcvwJ7zcMCL9 4pVmrYshE3aWcEtH0KeWBPOmC9N/S5U+LwG8W/c= X-Received: by 2002:a2e:8144:: with SMTP id t4mr1681835ljg.100.1598706662774; Sat, 29 Aug 2020 06:11:02 -0700 (PDT) MIME-Version: 1.0 References: <20200829124356.18148-1-krzk@kernel.org> In-Reply-To: <20200829124356.18148-1-krzk@kernel.org> From: Chanwoo Choi Date: Sat, 29 Aug 2020 22:10:26 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] extcon: max14577: Return error code of extcon_dev_allocate() To: Krzysztof Kozlowski Cc: Chanwoo Choi , Bartlomiej Zolnierkiewicz , MyungJoo Ham , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 29, 2020 at 9:46 PM Krzysztof Kozlowski wrote: > > 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 > Applied them for patch1-4. Thanks. -- Best Regards, Chanwoo Choi Samsung Electronics