From patchwork Tue Apr 2 14:45:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13614262 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F8D0C6FD1F for ; Tue, 2 Apr 2024 14:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=gRfamMKB/CWG/YElTM9NMhGr9DpOW27X5limazfdI9Q=; b=sdRU75Pg/gM6yA ms9kSAbZOLJ1P8lmi5+It3VqK5BzEGv25vEnYbmAKIID/WtARcsN1U6NW39dedxzRaAy5/KKsJrnF 7zfaQ+7qxcTrkLwjT8d8LHSXnw4monGVqn+tqoF4nmK78gX7mGXVGxL6H2s7XhKjHubwU+eu2XDJz MFWOhrLYXTSKVYCYkCnpl19346HFyYeEYwIAP3lrP31rbUjUpscRagEdyc2kxMhfD53jk2RWzEzw7 7nnG08vmCRm6i2WdgvXvyyoont8QQ4l3GXwimjLefHRXxeBKLdlQXDcCy7iOck0SyIk9XJnkxzu8e lyJZSDvwNCV33vJ7R8iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrfOK-0000000BfUj-0R1y; Tue, 02 Apr 2024 14:45:36 +0000 Received: from mgamail.intel.com ([192.198.163.8]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrfOH-0000000BfSR-0Fv5 for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 14:45:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712069133; x=1743605133; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=U8zDJrGwvowmpbloCTeIyqdQQakbZMEd/jFHCNTTLss=; b=Qo6+oTd94OwbJ1oR087FHmSu/dPZWIaSYLJLg9HWgej1jtLtC+m86wLs U9nS82D4JsG/w3ujQU5ubJVLCsa9hI3MuOO5avy6W7iLpCKAmyYDjqIyR W1eCEDTWoI4RCloqCU3hHqry3+1K2MbtKPmbGAJ0yRgQN74tVqM9OQrNl Q4XmHolfqJRYpwPBbeLX2e/SEJo9SG8bUmES1Ws75gAcyR5x3mrlqoJQD n6v8G2iXRrwaITYnVy8m72A6pH1jmymxkfYSihq2N6Jq1McQhBNs9S/YC LFOGxtzjfXDrHLr+d/0VXqjjLtK3EeUtgePnPlC9WkhjggSwPYDke/yJj Q==; X-CSE-ConnectionGUID: 4yXxdhfsQCmHR084Hu+XEQ== X-CSE-MsgGUID: 6Mxm+fIZQdmx1zpedjz1+g== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="24735383" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="24735383" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 07:45:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="937083583" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="937083583" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Apr 2024 07:45:28 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D756E1C5; Tue, 2 Apr 2024 17:45:27 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v1 1/1] spi: pxa2xx: Call pxa_ssp_free() after getting the SSP type Date: Tue, 2 Apr 2024 17:45:23 +0300 Message-ID: <20240402144523.3402063-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_074533_152347_19618593 X-CRM114-Status: GOOD ( 13.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org pxa_ssp_request() implies a reference counting, hence the pxa_ssp_free() must be called when we are done. Add missed call. Fixes: bb77c99ee6d3 ("spi: pxa2xx: Skip SSP initialization if it's done elsewhere") Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 86d0f1064a45..1348249f8178 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1379,8 +1379,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) type = (enum pxa_ssp_type)value; } else { ssp = pxa_ssp_request(pdev->id, pdev->name); - if (ssp) + if (ssp) { type = ssp->type; + pxa_ssp_free(ssp); + } } /* Validate the SSP type correctness */