diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-04-12 16:00:26 +0000 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-04-13 14:19:36 +0200 |
commit | 4aa3e48d2e09424449b2e0f2d5581388ba9e261b (patch) | |
tree | df7558efad4f93f1328e99b58c686c761fa8a002 /drivers | |
parent | 09aab7add7bf9a7368da94fd09529847255f5fd9 (diff) | |
download | linux-4aa3e48d2e09424449b2e0f2d5581388ba9e261b.tar.bz2 |
i2c: mpc: drop release for resource allocated with devm_*
It's not necessary to release resource which allocated with devm_*
and those release may leads to a double free. And also remove useless
irq_dispose_mapping() call since mapping not created.
Fixes: 09aab7add7bf ("i2c: mpc: use device managed APIs")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 46cdb36e2f9b..6e5614acebac 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c @@ -759,12 +759,6 @@ static int fsl_i2c_remove(struct platform_device *op) if (i2c->clk_per) clk_disable_unprepare(i2c->clk_per); - if (i2c->irq) - free_irq(i2c->irq, i2c); - - irq_dispose_mapping(i2c->irq); - iounmap(i2c->base); - kfree(i2c); return 0; }; |