diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2017-01-26 18:16:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-31 13:08:18 +0300 |
commit | f8a096059fc5f719301d314e5d7451f1bab5032a (patch) | |
tree | 3b3f6e19e39d7709bedee2b46e2507de8739c827 /drivers/misc/mei/hw-txe.c | |
parent | f046192d98c9a929c3eefdd65b885000d341d969 (diff) | |
download | linux-f8a096059fc5f719301d314e5d7451f1bab5032a.tar.xz |
mei: simplify error handling via devres function.
Use devm_ and pcim_ functions to make error handling
simpler and code smaller and tidier.
Based on original patch by
mei: me: use managed functions pcim_* and devm_*
https://lkml.org/lkml/2016/2/1/339
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/hw-txe.c')
-rw-r--r-- | drivers/misc/mei/hw-txe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/hw-txe.c b/drivers/misc/mei/hw-txe.c index 6259b11d440c..24e4a4c96606 100644 --- a/drivers/misc/mei/hw-txe.c +++ b/drivers/misc/mei/hw-txe.c @@ -1207,8 +1207,8 @@ struct mei_device *mei_txe_dev_init(struct pci_dev *pdev) struct mei_device *dev; struct mei_txe_hw *hw; - dev = kzalloc(sizeof(struct mei_device) + - sizeof(struct mei_txe_hw), GFP_KERNEL); + dev = devm_kzalloc(&pdev->dev, sizeof(struct mei_device) + + sizeof(struct mei_txe_hw), GFP_KERNEL); if (!dev) return NULL; |