MIPS: TXx9: Add missing iounmap
PATCH 1/1 MIPS: TXx9: Add missing iounmap
Add the missing iounmap() before put_device and
return from txx9_sramc_init().
Signed-off-by Vasyl Gomonovych <[email protected]>
--- arch/mips/txx9/generic/setup.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/txx9/generic/setup.c +2 -0
@@ -965,6 +965,8 @@ void __init txx9_sramc_init(struct resource *r) }return ; exit_put: +if (dev->base) +iounmap (dev->base);put_device (&dev->dev);return ; }
Signature · 1 line
1.9.1
Quoted 13 lines · Vasyl Gomonovych
Add the missing
iounmap()beforeput_deviceand
return fromtxx9_sramc_init().Signed-off-by Vasyl Gomonovych <[email protected]>--- arch/mips/txx9/generic/setup.c | 2 ++ 1 file changed, 2 insertions(+)arch/mips/txx9/generic/setup.c +0
-0
arch/mips/txx9/generic/setup.c void __init txx9_sramc_init(struct resource *r) · line 969
Quoted 5 lines
arch/mips/txx9/generic/setup.c +2
-0@@ -965,6 +965,8 @@ void __init txx9_sramc_init(struct resource *r) }return ; exit_put: +if (dev->base) +iounmap (dev->base);
I think if dev->base was NULL then a different error path would have been taken already.
More concerning to be honest though is the sysfs_create_bin_file() error handling just above here, which seems to iounmap() and kfree() *after* device_unregister(). txx9_device_release() already kfrees it.
The iounmap() call should prresumably move before the kfree() in txx9_device_release(), and the kfree() after device_unregister() should be removed?
Cheers
James
Quoted 6 lines
arch/mips/txx9/generic/setup.c +0
-0put_device (&dev->dev);return ; }Signature · 1 line
1.9.1