Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp942057pxp; Wed, 16 Mar 2022 22:05:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIz5KQGsqTCiFoYvvJZwj8H5YnOSumHKUMNigdL4I8s6QQZSjqLAfN+O3IEH8S/CAqneij X-Received: by 2002:a63:cf09:0:b0:372:d564:8024 with SMTP id j9-20020a63cf09000000b00372d5648024mr2306130pgg.251.1647493540380; Wed, 16 Mar 2022 22:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647493540; cv=none; d=google.com; s=arc-20160816; b=Ly15Sni9hp8DK+b9I1h7DTjbBCg/0t189TMlviONIQZjtJ0UK/xQqyZ/xSCjuGX5eP 1mdC9/aHuSZTNUk79qh4f95tsWqsPEjP4qzvzhqT9pOml+5f1vTswQufayn1qD9shBDJ OHt6jfjdEnOtd98YeAKggbuVmnVLMEQtomZG16YbWHOnqA7fgfu1g0MCkAPSkLYEqBoI ks8MLy6cs8AOjLauB6wWTdXpxeFnxqQtq9Os7JXoayNC2arQ+iXgXQUG0LfVrtOr6WMX BuR1kD28nxrToQUqARgZ9VMO6HF9d07+fTfvnltjd64oL/GBBgRJ6X77jj1R1b3YKysM ovlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CAQV7OW5DIVoy49mXItJtHDnpMN5TYYxiJrbhxC4jyk=; b=DMftoSSRL4DXJn6NcAfWj5y97Pbo0/s5nrKXyfsGkKUVLsRNznIUHsWjRc6WHfFVdg 7JHjIDU9Fq4ndrXGfg1XX11D6qEv6PFDzAT0VT8XInH8ClepUni7ceZsheHlDu3B0SUe +VKV6Ijph6w0JjSWpC0Hn3/FXVhVucPQgsxJb4e/ll323RXHf9wHPadZQ3QZjfopu1bH OnZc8OnJJ9VCycITkDQsjSBkZ2PlJ8rkpglvrKaAeXRbPBfeBuQQ35bRhdtl4RVLGhMo gddzDpkpof2pNHJTQA+Y6HqSk1xbrn9XcJTLrt16CqS1F/SRDpxn11US5fHc7yYP2mVQ sNzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jDH/0OzY"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z22-20020a656116000000b003816043efa9si1037945pgu.414.2022.03.16.22.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:05:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jDH/0OzY"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E5FC1138; Wed, 16 Mar 2022 21:17:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245338AbiCOBUw (ORCPT + 99 others); Mon, 14 Mar 2022 21:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241657AbiCOBUv (ORCPT ); Mon, 14 Mar 2022 21:20:51 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DBE8473A4 for ; Mon, 14 Mar 2022 18:19:40 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id e186so34349757ybc.7 for ; Mon, 14 Mar 2022 18:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CAQV7OW5DIVoy49mXItJtHDnpMN5TYYxiJrbhxC4jyk=; b=jDH/0OzYmEqK2xNtLP4C5LVw0ybx+9cFmcuBzO8v8nvbMZVcfdWLyuQ5azyCWwpKYX y6pyeV2rZU2akXuq+5RZ15ARo9wjY0ros0PMYNUCwaqfqw9zKW98Pan/9ENpwzGTi5nM GZgxWPDl3zEJPoqaweUa23Wn7sGRAhqfPJ/D7uowDIpC666MmZig5BOKGgnTMiKMQfWP rf0EgURF93cr4+pNa59EWV2ahfcUG1MIm/hRLJiny0vi5ygLsY9t12R1Vs/r1I0H00dk sJx+zX3m2ROXSyHcW1ViasJbMWkh9WSh8Y9HpED/hV3tV02CyHUyoY6PxeVUQg9kSCBk lIwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CAQV7OW5DIVoy49mXItJtHDnpMN5TYYxiJrbhxC4jyk=; b=DdUcouHHrp/KLoFNQSOI201Dc1TWxhTI8pCC54e7lWT6fdYd5ML1Mv6Q/kMF8irsD9 2Cc0qoFFVWY0ro6Ywg1WgIrNs/FTscyeA05mRAXF0M1e1HkCBovYLALpn3PBfzZwzeUI KpEUhMuafmHv0n+hajptSxfka1zt4QetAtReuQoO712w5WWvCYEM3YTayQO7yvF63IZy nWiA2tQyvVilc3hKJFyKR0JqQt89Vokxi8bUKPDQ9sI8Z216RO4N+mtZ6aTYISN6zBd9 wrzO/p/XArIXl7dnV3z6/yMiWbDbbTH00doJ2A9mOrATA+ucYD6EoFcBxC5sv5+iKNOn SdBg== X-Gm-Message-State: AOAM531AUQN2648NMeI2SmbnIJbUbwBFqXI2rGvdT2mUzhCESepR+5D/ IMoHeRLOQT9onKaLHXoVftLJAhk95eo+dPplhrdOeGjXaTk= X-Received: by 2002:a25:ab64:0:b0:633:6d02:ebc8 with SMTP id u91-20020a25ab64000000b006336d02ebc8mr2610032ybi.492.1647307179860; Mon, 14 Mar 2022 18:19:39 -0700 (PDT) MIME-Version: 1.0 References: <20220303080206.16463-1-tangmeng@uniontech.com> In-Reply-To: <20220303080206.16463-1-tangmeng@uniontech.com> From: Linus Walleij Date: Tue, 15 Mar 2022 02:19:28 +0100 Message-ID: Subject: Re: [PATCH] pinctrl: berlin: fix error return code of berlin_pinctrl_build_state() To: Meng Tang Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 3, 2022 at 9:02 AM Meng Tang wrote: > When krealloc() fails and pctrl->functions is NULL, no error > return code of berlin_pinctrl_build_state() is assigned. > To fix this bug, ret is assigned with -ENOMEM when pctrl->functions > is NULL. > > Signed-off-by: Meng Tang Patch applied! Yours, Linus Walleij