Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6748175iob; Wed, 11 May 2022 04:40:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK/NHsU/sCzllVtx+Hm54RPoUdsgH8I8eK/OALPURB2uEa6FWKppE/oDVI9TonKJhbwMXj X-Received: by 2002:a17:906:3ed5:b0:6f5:108c:a45 with SMTP id d21-20020a1709063ed500b006f5108c0a45mr24190458ejj.623.1652269235943; Wed, 11 May 2022 04:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652269235; cv=none; d=google.com; s=arc-20160816; b=rb8eR9sDdVf7901tPFzEU20BlU9COHZXClIqOZC4Q4J37k3TgULzmRGw7FXg/mc5Sn wdUg5QURUCqGM8rFUBTiqfmtQGJQvr0mA3v7ScK85g4JE5lHx1z2lAIQwh+Pg0VCxk/r v8rdjKKlYzsPPuFvfkcwvn1Fa53zgaFv0Ayi0EyyXmigYLQdCt53BLy+08T8LP3x+yTZ TkDhyh1f7aXOgTP2Jy6AwEzYAar8c1PQNeH2VuUxFs7FJu6sSCZVFGTHBXCFFvH48le9 zRA+94cdl/pPkZBiGbxupLlprn03CyYwLgzv14SGaJ4ovDkFTYjZHWvQCM5IwgAKc4UU DfMg== 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=diBqFc+BoWzAr/VmLH7dKrLdPRQvzkNUrCN5zzOorr4=; b=Pkm/8zOI8Lq8JqpTmK+vr8jBjuTVSllDFslVOMPM4Jx0hI4RNEZiB+z0La0vfiYe8I TLIMXTxlYFWiDJK/nohFN8LS3WFEWYdQVOcf60kKT0H17st5Dq8qdPvm4r1QZgJqU5zx +m52SnE5Eyn5jI84mvlt0Obw9BSWdbyB5hQ2rjMqUC1ArqJAWuZz8H5u4NCPa66PiuNK L6lbK+Au3BcqcXfpT/OQtL4aKMEhSL2PnjdlyY+HTfk9Sdu1VPsfLfa5++swa3PSJ4H3 oLus1A6I7/5/rMtwkEjvX61BQ2E+wv3mjhI7UrtRpmQXceY/FIPKqKLXflJGTg3Xhnua g72w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j7v8dV+o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du7-20020a17090772c700b006f3b74c80e0si2227694ejc.460.2022.05.11.04.40.10; Wed, 11 May 2022 04:40:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j7v8dV+o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbiEKKcm (ORCPT + 99 others); Wed, 11 May 2022 06:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbiEKKcg (ORCPT ); Wed, 11 May 2022 06:32:36 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5309C68335 for ; Wed, 11 May 2022 03:32:33 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id n10so3126019ejk.5 for ; Wed, 11 May 2022 03:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=diBqFc+BoWzAr/VmLH7dKrLdPRQvzkNUrCN5zzOorr4=; b=j7v8dV+of4JcYw6oQpjfYDg+/AhDGlh8rWDyVb4dNZFpWwCXA/ba7PSzuOc073fq5C CkbxcaE8TIYaP/pepZuL48hr/m1y4+28nijoEjmbwdqh6cKWZ9DJnWqZNJdkIV7JUYyK K+adh0jDs6KRrHOvq2jskXIux2qU/jq084T6hmNIBFHJD1Kdjv3EQgIogmZypxSboneH u24R/YdKD1LA+I5Zm3gwoh4EXivmzYiVlM1C6kwKzu3sEDV7G/8qbNQlrgM+GuoAmdEE TrmZCR0vnIxqBgF7fdIt1N9tzj894I735RdxUya0xlE6QJTIBqjtLCBvRhw/nG5KNTUv 2ZWw== 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=diBqFc+BoWzAr/VmLH7dKrLdPRQvzkNUrCN5zzOorr4=; b=yZavLABkBdn9iodIwjOm6Uzpr2g9tIM7DdkiyzEVdVEUh8tJ+ToAeWi1UVW4XT15lj bhDPlmhFwdK+q9yS5Th28atk+pP+wE+XEbxmcXlo6Q6li5/+NiRN0XDw75W2f15tZ+f2 8OdkUKo5dpKoc9e3wc0a32glrPYDtW4qdDm3nMrYwottY5RrXhTxBvDQZ+RPtwzVeSos LC8FPH89PIlau7JOgClCMAjBXSfrEzeLc+o9faP052YH+HtzxtPoWmfAiFSdzW5Twe30 MX7ZOm+DURpZxvxPSUVczD/WpVpETyd9TFdzsdLvvtu3I/Zst+TsXux5rpWeEoVM8ctD QsiA== X-Gm-Message-State: AOAM532XWovvHmNteHSxShRt5stK0K4J/xYcfu9J2/tGDy9Tth455zIx ziynDhBz4HItOywKVzIU8O41HyuvmOajFIZnzlI= X-Received: by 2002:a17:906:c14b:b0:6f8:e6bb:f8d5 with SMTP id dp11-20020a170906c14b00b006f8e6bbf8d5mr16921243ejc.4.1652265151596; Wed, 11 May 2022 03:32:31 -0700 (PDT) MIME-Version: 1.0 References: <20220511065803.3957-1-linmq006@gmail.com> In-Reply-To: <20220511065803.3957-1-linmq006@gmail.com> From: Fabio Estevam Date: Wed, 11 May 2022 07:32:19 -0300 Message-ID: Subject: Re: [PATCH] ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe To: Miaoqian Lin Cc: Shengjiu Wang , Xiubo Li , Nicolin Chen , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , Richard Zhao , Linux-ALSA , linuxppc-dev , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, May 11, 2022 at 3:58 AM Miaoqian Lin wrote: > > of_find_i2c_device_by_node() takes a reference, > In error paths, we should call put_device() to drop > the reference to aviod refount leak. s/aviod refount/avoid refcount > Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") > Signed-off-by: Miaoqian Lin Reviewed-by: Fabio Estevam