Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1150838ybm; Wed, 22 May 2019 18:31:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3pMLY7ZsBAVoJ2OTpe7Wy6/Nu+8NN8cYExdGgzIXW/awDFClwjBEHfmwdewiafMurFD4D X-Received: by 2002:a62:75c6:: with SMTP id q189mr98194575pfc.98.1558575114774; Wed, 22 May 2019 18:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558575114; cv=none; d=google.com; s=arc-20160816; b=aTkDuz+QT2B3vG4CFAm6KP5O8SHWJ6ublmEckHUeIpTg78jCV6WZHY6THKFC1KX4Vv LilfFkeSl+z02wMKu6TCiHBEvPVviICvgwl6Lis6xKh4UiuVI3ZmWnL17nkV/t1VVicm ZZu3BvOAFS95byQ3Ui+e66KL5eR7t9yxrCZtAQRVJKr9cpqetFqpJphF8jjz63J720KM KJC2Bd6BciwrKTJji3ajRLtYHCnH4fu4OgqFJezq+OfDDuiEOHS0gJ2BfGMIYQYB/dWA m1cCIyOK0H5IUIf+TfjYv1IJIN49+SNzC+BAab07S5oAt6+YJgEbbCsN182y3btEzztz L7zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:message-id :date:subject:cc:to:from; bh=SAHDDiy+8cJTvUTqoCRwjDBSwZmy4x7d81HaiiKYpNs=; b=hL4AFGzBXThnOQJp/M4At1iOozNI47XptfpO2gaCRdTUuGzuiqETo1V2vwlRcpfFvP HdM6BWZIuzew8XA8ylzJhUeq9Ms/Nolsb3Qd3ul790nAJvKJoHiU5+N73Ym1gLQukc9N QpfsZF417hn3Zoo0kvS/Qc5dwVZEI1mL44geCsXSNGQUbf9ZX81sutdwTxeTDFyxLioz r2cYs1MQpSQwPK/tbnjBIugdHPlud5VLEcQx+0xCk3ch8uW8LjIjrQ9nkN2Pl4UYYKF2 atISNeDgNijihEGPvRY+21AyqjE+whson3ZwLniOpnRJ/mPAnLjP/s2MAtoRCNuhJm8c mFHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="jYM//wB8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22si29852038pgj.271.2019.05.22.18.31.38; Wed, 22 May 2019 18:31:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@nvidia.com header.s=n1 header.b="jYM//wB8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729721AbfEWB3L (ORCPT + 99 others); Wed, 22 May 2019 21:29:11 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:2361 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727305AbfEWB3L (ORCPT ); Wed, 22 May 2019 21:29:11 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 22 May 2019 18:29:10 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 22 May 2019 18:29:10 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 22 May 2019 18:29:10 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 23 May 2019 01:29:09 +0000 Received: from HQMAIL104.nvidia.com (172.18.146.11) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 23 May 2019 01:29:09 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 23 May 2019 01:29:09 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.170.210]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 22 May 2019 18:29:09 -0700 From: Sowjanya Komatineni To: , , , , CC: , , , Sowjanya Komatineni Subject: [PATCH V1] spi: tegra114: set master cleanup and also invoke it on probe error Date: Wed, 22 May 2019 18:29:04 -0700 Message-ID: <1558574945-19275-1-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1558574950; bh=SAHDDiy+8cJTvUTqoCRwjDBSwZmy4x7d81HaiiKYpNs=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=jYM//wB8NmUazpt22CMuPDn4kYvBJspP5cJzDflqciF9UGwDjY4CrdqBDKAFUQh5B jfB/mVjYVDbcaLgUJgf1WlglyFgVRGRxaCHfyzq52bt8oTbCLM9h+72uXpWYJZmhEH HqZwypcZwgS5X4L3YspTZQr3jORGgRW+shsrDyDnvnvdM8pc4wEpPFcvYcGtoaXpQy OU1r++T3yHRYRFGrHWiapbWF0e1zf2MtKgYXKsP1ggnZWpp/kXRLD8xvgc4Br5EmjW I7G0TwHZ7ZraTHUbxiB4GqAWK+5m99bpqVreYH4ko8aMod75eiX5GI1E8IsX3pHyw5 Y+D+uXyBIJ2qA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch sets master cleanup and also invokes tegra spi clean on tegra spi probe failure to release tegra spi client data. Signed-off-by: Sowjanya Komatineni --- drivers/spi/spi-tegra114.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 253a7f182fc9..15f9368fc0f8 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -966,6 +966,8 @@ static int tegra_spi_setup(struct spi_device *spi) ret = pm_runtime_get_sync(tspi->dev); if (ret < 0) { dev_err(tspi->dev, "pm runtime failed, e = %d\n", ret); + if (cdata) + tegra_spi_cleanup(spi); return ret; } @@ -1331,6 +1333,7 @@ static int tegra_spi_probe(struct platform_device *pdev) SPI_TX_DUAL | SPI_RX_DUAL | SPI_3WIRE; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32); master->setup = tegra_spi_setup; + master->cleanup = tegra_spi_cleanup; master->transfer_one_message = tegra_spi_transfer_one_message; master->set_cs_timing = tegra_spi_set_hw_cs_timing; master->num_chipselect = MAX_CHIP_SELECT; -- 2.7.4