From patchwork Thu Nov 28 16:50:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 180456 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp373426ile; Thu, 28 Nov 2019 08:50:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxh+QtGegeXPM+z/XddWvWtj33dmlcmNhXx/smnIskf5qLaJl2QiP2G8DBaFmzywb4QY49A X-Received: by 2002:a50:ee96:: with SMTP id f22mr38907149edr.86.1574959823319; Thu, 28 Nov 2019 08:50:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574959823; cv=none; d=google.com; s=arc-20160816; b=cmI9KjS6rZmKhMc8k5T0UfSJrqVePvszWfC+rWpM5evndtzh7mSGgcRacFZAAY6TGs RYWT4I8imMu9x08zJf5SLZxi6+MNP4Rhdj/eAZifvOJIEW/Y93/NujBOFEw4PnAPo7wg M8Ijg4Cowb6vgOW05MetYSztRPaAdzOOQObN2UZUfKbqGZdtjHtwNlOjxOBd1PMxP9oC SV5EEw9Q5iprVxZLjdLeXz3brPrXpmJT9lvVGU+PSk7MsRHSqs0xyzWWA0AlfPvZBhWD O4fjWrGsrAHY2/y5Su3tm7Vg+jD7fel84W69jsvFQZZL2KdEmKIJdzlzfRVUs9VDJdtF 0sIQ== 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:cc:to:from:dkim-signature; bh=Pq5KE5gIMiwWIeSMy3T4ZpUVkQI2nKjqwjW9YajORlM=; b=lDIVkRFxpswwh+xSl1NDXdUohxlL07MCKgH3onoWHVkFoUAtgwC+73dX8U+mXeUbvw VyVjyPnk09L0msry4yLzHdxbXhd4d6YmwRgPBOtn7H2SpOFvp+zezASgsDKU/lLFhN4+ dW4HG5wl7lIlY8mwbuJ0TRDOcCOvjbQnCG3OC7QuerXdnesrAmiNUNi/OnR3owgnfrFP V6AE0fltYw4dcCi0QNNBTbuoNRMeHyTuRWCd09iZ6R5b4hDXZv3ZlqwUTa8ATMFFGTQS Q7p7dFvXCjHAF832HGPczgd5LG/8u4Xi7Nl7biWkPl0Gx/9hRL5ff9puebTzG0+W32XA F/Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l+WJiw5F; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si12800266edv.82.2019.11.28.08.50.22; Thu, 28 Nov 2019 08:50:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l+WJiw5F; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbfK1QuV (ORCPT + 15 others); Thu, 28 Nov 2019 11:50:21 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36604 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727116AbfK1QuU (ORCPT ); Thu, 28 Nov 2019 11:50:20 -0500 Received: by mail-pl1-f194.google.com with SMTP id d7so11814807pls.3 for ; Thu, 28 Nov 2019 08:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Pq5KE5gIMiwWIeSMy3T4ZpUVkQI2nKjqwjW9YajORlM=; b=l+WJiw5FLVFlg2GB6XJBFoKiX8wRGvOC39Lkh0eo9GF2U1R5dvDk5qSGf0mZyR0vCc Y7e4vpSWAV0QLx5g1zc+WO0pWa1anz+Bd+U/2YxuciS5ALd7iNeJkkUa8nQJacIba+Pm 0kLdz+ycG9JYZZWa0KBQT0hJPYBJvCoV4sPn10uWObuUAwd5O/pKNS6lfP6kVi4XGlZt 0g5fZWPqGFgLCDLo008WlXCCWNBhf0GsbRKmNpMq8thQiVZRSJ9x8fpfVK/TwTpgQJIE pJHBx8mNVXJMnQR7I8ruSp5OH3kkQDcwIBA372I/NWDLX3AGmAIEQywRGQThamt3rYX6 dl9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Pq5KE5gIMiwWIeSMy3T4ZpUVkQI2nKjqwjW9YajORlM=; b=n2ttEdN5nVtTDVrxcmngy7GC+lrqfjaFCeB4N0HHMVMEQ9OIb1NilKd2g4Mt3pLY12 BL92mcVhT977jlAxN6jOM32P9wkPsy3zZbbHUBHrtreRYxWovu8kur91Ye1ypcYndyF4 b6f3OiwjZgUvacwIVlpPxXynS8lY/aeJYGm/Qz73OUnVMiTyXjBUey1RyhWSkfmvFGJk imcd7noP4nve7ChlXua4pYYR7UrLzHI7raDpnE/1gZrEfitX+L/D7dyeWHAmCT4hezUd OkcSm0mif6krA9jFCjAkodr06qOpnO85oaOYp0UNCuzBaNUmg4I+9BZe8X+7woKqskGX duKA== X-Gm-Message-State: APjAAAUS3nSoY2LmKgYpA+N6YPm7yWFwOJRah9gXIwOxvYr55yAg1Jzz bIVoKW6SqcsU2hnCnogDGVU5Wb051Xo= X-Received: by 2002:a17:902:d696:: with SMTP id v22mr10301232ply.66.1574959819278; Thu, 28 Nov 2019 08:50:19 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id a15sm2450343pfh.169.2019.11.28.08.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 08:50:18 -0800 (PST) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [stable 4.19][PATCH 16/17] ASoC: stm32: sai: add missing put_device() Date: Thu, 28 Nov 2019 09:50:01 -0700 Message-Id: <20191128165002.6234-17-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128165002.6234-1-mathieu.poirier@linaro.org> References: <20191128165002.6234-1-mathieu.poirier@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wen Yang commit 1c3816a194870e7a6622345dab7fb56c7d708613 upstream The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference. Fixes: 7dd0d835582f ("ASoC: stm32: sai: simplify sync modes management") Signed-off-by: Wen Yang Acked-by: Olivier Moysan Signed-off-by: Mark Brown Cc: stable # 4.19 Signed-off-by: Mathieu Poirier --- sound/soc/stm/stm32_sai.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index f22654253c43..540c4a00405c 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -112,16 +112,21 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client, if (!sai_provider) { dev_err(&sai_client->pdev->dev, "SAI sync provider data not found\n"); - return -EINVAL; + ret = -EINVAL; + goto out_put_dev; } /* Configure sync client */ ret = stm32_sai_sync_conf_client(sai_client, synci); if (ret < 0) - return ret; + goto out_put_dev; /* Configure sync provider */ - return stm32_sai_sync_conf_provider(sai_provider, synco); + ret = stm32_sai_sync_conf_provider(sai_provider, synco); + +out_put_dev: + put_device(&pdev->dev); + return ret; } static int stm32_sai_probe(struct platform_device *pdev)