summaryrefslogtreecommitdiffstats
path: root/drivers/dma/mic_x100_dma.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2018-10-05 14:19:02 +0200
committerWolfram Sang <wsa@the-dreams.de>2018-10-05 14:19:02 +0200
commit05552832204e37e038d550e1354300eb11a9e5ec (patch)
tree69f7ef1f98e2382b35d7e6098705c00fcfa3d3c3 /drivers/dma/mic_x100_dma.c
parent49d54abee9d1507e117a4218dc5baa3ebc5b93f1 (diff)
parent9a9e295e7c5c0409c020088b0ae017e6c2b7df6e (diff)
downloadlinux-05552832204e37e038d550e1354300eb11a9e5ec.tar.bz2
Merge tag 'at24-4.20-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-4.20
AT24 updates for 4.20 Single patch from Wang Xin improving the read/write loop in at24 under high load.
Diffstat (limited to 'drivers/dma/mic_x100_dma.c')
-rw-r--r--drivers/dma/mic_x100_dma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index b76cb17d879c..adfd316db1a8 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -639,7 +639,7 @@ static struct mic_dma_device *mic_dma_dev_reg(struct mbus_device *mbdev,
int ret;
struct device *dev = &mbdev->dev;
- mic_dma_dev = kzalloc(sizeof(*mic_dma_dev), GFP_KERNEL);
+ mic_dma_dev = devm_kzalloc(dev, sizeof(*mic_dma_dev), GFP_KERNEL);
if (!mic_dma_dev) {
ret = -ENOMEM;
goto alloc_error;
@@ -664,7 +664,6 @@ static struct mic_dma_device *mic_dma_dev_reg(struct mbus_device *mbdev,
reg_error:
mic_dma_uninit(mic_dma_dev);
init_error:
- kfree(mic_dma_dev);
mic_dma_dev = NULL;
alloc_error:
dev_err(dev, "Error at %s %d ret=%d\n", __func__, __LINE__, ret);
@@ -674,7 +673,6 @@ alloc_error:
static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
{
mic_dma_uninit(mic_dma_dev);
- kfree(mic_dma_dev);
}
/* DEBUGFS CODE */