MIPS: drivers: fix clk leak
Subsystems (2)
PATCH 1/1 MIPS: drivers: fix clk leak
when gptu_r32 fail, we should put clk before return
Signed-off-by Libo Chen <[email protected]>
--- arch/mips/lantiq/xway/gptu.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/mips/lantiq/xway/gptu.c +2 -0
@@ -169,6 +169,8 @@ static int gptu_probe(struct platform_device *pdev)if (((gptu_r32 (GPTU_ID ) >>8 ) &0xff ) !=GPTU_MAGIC ) {dev_err (&pdev->dev,"Failed to find magic\n" );gptu_hwexit (); +clk_disable (clk); +clk_put (clk);return -ENAVAIL ; }
Signature · 1 line
1.7.1
Quoted 4 lines · Libo Chen
when
gptu_r32fail, we should put clk before returnSigned-off-by Libo Chen<[email protected]>
Acked-by John Crispin <[email protected]>
Quoted 17 lines
--- arch/mips/lantiq/xway/gptu.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/mips/lantiq/xway/gptu.c +2
-0@@ -169,6 +169,8 @@ static int gptu_probe(struct platform_device *pdev)if (((gptu_r32 (GPTU_ID )>>8 )&0xff ) !=GPTU_MAGIC ) {dev_err (&pdev->dev,"Failed to find magic\n" );gptu_hwexit (); +clk_disable (clk); +clk_put (clk);return -ENAVAIL ; }