From: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
To: David Brownell <dbrownell@users.sourceforge.net>,
Grant Likely <grant.likely@secretlab.ca>,
spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Cc: qi.wang@intel.com, yong.y.wang@intel.com, joel.clark@intel.com,
kok.howg.ewe@intel.com,
Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Subject: [PATCH 2/3] spi_topcliff_pch: change calling function order correctly in remove
Date: Mon, 27 Dec 2010 20:23:46 +0900 [thread overview]
Message-ID: <1293449027-3219-2-git-send-email-tomoya-linux@dsn.okisemi.com> (raw)
In-Reply-To: <1293449027-3219-1-git-send-email-tomoya-linux@dsn.okisemi.com>
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
drivers/spi/spi_topcliff_pch.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi_topcliff_pch.c b/drivers/spi/spi_topcliff_pch.c
index 18e077b..a796eaf 100644
--- a/drivers/spi/spi_topcliff_pch.c
+++ b/drivers/spi/spi_topcliff_pch.c
@@ -1166,21 +1166,21 @@ static void pch_spi_remove(struct pci_dev *pdev)
spin_unlock(&board_dat->data[i]->lock);
}
- /* Free resources allocated for PCH SPI */
- pch_spi_free_resources(board_dat);
-
/* Unregister SPI master */
for (i = 0; i < board_dat->num; i++)
spi_unregister_master(board_dat->data[i]->master);
- /* free memory for private data */
- kfree(board_dat);
+ /* Free resources allocated for PCH SPI */
+ pch_spi_free_resources(board_dat);
pci_set_drvdata(pdev, NULL);
/* disable PCI device */
pci_disable_device(pdev);
+ /* free memory for private data */
+ kfree(board_dat);
+
dev_dbg(&pdev->dev, "%s invoked pci_disable_device\n", __func__);
}
--
1.6.0.6
next prev parent reply other threads:[~2010-12-27 11:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 11:23 [PATCH 1/3] spi_topcliff_pch: support new device ML7213 Tomoya MORINAGA
2010-12-27 11:23 ` Tomoya MORINAGA [this message]
2010-12-27 11:23 ` [PATCH 3/3] spi_topcliff_pch: fix resource leak issue Tomoya MORINAGA
2010-12-29 6:51 ` Grant Likely
2010-12-29 6:51 ` [PATCH 2/3] spi_topcliff_pch: change calling function order correctly in remove Grant Likely
2010-12-29 6:49 ` [PATCH 1/3] spi_topcliff_pch: support new device ML7213 Grant Likely
2011-01-05 2:34 ` Tomoya MORINAGA
2011-01-05 16:38 ` Grant Likely
2011-01-07 6:40 ` Tomoya MORINAGA
[not found] ` <46862922F48B45F781832619CF3F4B79-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>
2011-01-07 9:21 ` Milton Miller
[not found] ` <topcliff-split-kM9DGJe42AJBDgjK7y7TUQ@public.gmane.org>
2011-01-07 9:45 ` Tomoya MORINAGA
2011-01-11 9:38 ` Tomoya MORINAGA
[not found] ` <84FF3503839A46E0B9919DF000DDE5C5-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>
2011-01-21 18:48 ` Grant Likely
[not found] ` <20110121184852.GA18603-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-01-24 3:14 ` Tomoya MORINAGA
2011-01-11 9:42 ` Tomoya MORINAGA
2011-01-12 5:27 ` Tomoya MORINAGA
2011-01-18 12:36 ` Tomoya MORINAGA
2011-01-19 6:25 ` Grant Likely
2011-01-07 9:45 ` Milton Miller
2011-01-07 9:57 ` Milton Miller
2011-01-07 6:47 ` Tomoya MORINAGA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1293449027-3219-2-git-send-email-tomoya-linux@dsn.okisemi.com \
--to=tomoya-linux@dsn.okisemi.com \
--cc=dbrownell@users.sourceforge.net \
--cc=grant.likely@secretlab.ca \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qi.wang@intel.com \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=yong.y.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).