regulator: tps6594-regulator: Correct nr_types assignment
cover regulator: tps6594-regulator: Correct nr_types assignment
Correct nr_types assignment for TPS6594/3 and TPS65224 in probe().
Shree Ramamoorthy (1):
Fix nr_types assignment for TPS6594/3 and TPS65224
drivers/regulator/tps6594-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
Signed-off-by: Shree Ramamoorthy <[email protected]>
PATCH 1/1 Correct nr_types assignment for TPS6594/3 and TPS65224
Swap nr_types assignment for TPS6594/3 and TPS65224. Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.
Log:
[ 13.974024] Call trace: [ 13.974025] _regulator_put.part.0+0x40/0x48 [ 13.974028] regulator_register+0x2b0/0xa00 [ 13.974031] devm_regulator_register+0x58/0xa0 [ 13.974035] tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator] ... [ 13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
--- drivers/regulator/tps6594-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/tps6594-regulator.c +2 -2
@@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev) }else if (tps->chip_id ==TPS65224 ) { nr_buck =ARRAY_SIZE (tps65224_buck_regs); nr_ldo =ARRAY_SIZE (tps65224_ldo_regs); - nr_types =REGS_INT_NB ; + nr_types =TPS65224_REGS_INT_NB ; }else { nr_buck =ARRAY_SIZE (buck_regs); nr_ldo =ARRAY_SIZE (tps6594_ldo_regs); - nr_types =TPS65224_REGS_INT_NB ; + nr_types =REGS_INT_NB ; } reg_irq_nb = nr_types * (nr_buck + nr_ldo);
--
Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
Quoted 2 lines · Shree Ramamoorthy
Swap
nr_typesassignment for TPS6594/3 and TPS65224. Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.
Please prefix line, where you want this patch to go
like tiL6.6 or so
Quoted 33 lines
Log:
[ 13.974024] Call trace: [ 13.974025] _regulator_put.part.0+0x40/0x48 [ 13.974028] regulator_register+0x2b0/0xa00 [ 13.974031] devm_regulator_register+0x58/0xa0 [ 13.974035] tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator] ... [ 13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004Signed-off-by Shree Ramamoorthy <[email protected]>--- drivers/regulator/tps6594-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/regulator/tps6594-regulator.c +2
-3@@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev) }else if (tps->chip_id ==TPS65224 ) { nr_buck =ARRAY_SIZE (tps65224_buck_regs); nr_ldo =ARRAY_SIZE (tps65224_ldo_regs); - nr_types =REGS_INT_NB ; + nr_types =TPS65224_REGS_INT_NB ; }else { nr_buck =ARRAY_SIZE (buck_regs); nr_ldo =ARRAY_SIZE (tps6594_ldo_regs); - nr_types =TPS65224_REGS_INT_NB ; + nr_types =REGS_INT_NB ; } reg_irq_nb = nr_types * (nr_buck + nr_ldo); --
Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
Please ignore below response .
Sent by mistake.
Thanks
Udit
Quoted 44 lines · Udit
Quoted 2 lines · Shree Ramamoorthy
Swap
nr_typesassignment for TPS6594/3 and TPS65224. Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.Please prefix line, where you want this patch to go
like tiL6.6 or so
Quoted 33 lines
Log:
[ 13.974024] Call trace:
[ 13.974025] _regulator_put.part.0+0x40/0x48
[ 13.974028]regulator_register+0x2b0/0xa00
[ 13.974031]devm_regulator_register+0x58/0xa0
[ 13.974035]tps6594_regulator_probe+0x4e0/0x5f0[tps6594_regulator]
...
[ 13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004Signed-off-by Shree Ramamoorthy <[email protected]>---
drivers/regulator/tps6594-regulator.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/regulator/tps6594-regulator.c +2
-2@@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev) } else if (tps->chip_id == TPS65224) { nr_buck = ARRAY_SIZE(tps65224_buck_regs); nr_ldo = ARRAY_SIZE(tps65224_ldo_regs); - nr_types = REGS_INT_NB; + nr_types = TPS65224_REGS_INT_NB; } else { nr_buck = ARRAY_SIZE(buck_regs); nr_ldo = ARRAY_SIZE(tps6594_ldo_regs); - nr_types = TPS65224_REGS_INT_NB; + nr_types = REGS_INT_NB; } reg_irq_nb = nr_types * (nr_buck + nr_ldo);
Re: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224
In reply to Shree RamamoorthyQuoted 12 lines · Shree Ramamoorthy
Swap
nr_typesassignment for TPS6594/3 and TPS65224. Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board.Log:
[ 13.974024] Call trace: [ 13.974025] _regulator_put.part.0+0x40/0x48 [ 13.974028] regulator_register+0x2b0/0xa00 [ 13.974031] devm_regulator_register+0x58/0xa0 [ 13.974035] tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator] ... [ 13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
Quoted 2 lines
Signed-off-by Shree Ramamoorthy <[email protected]>---
Please add a appropriate Fixes: tag
Quoted 22 lines
drivers/regulator/tps6594-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/regulator/tps6594-regulator.c +2
-3@@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev) }else if (tps->chip_id ==TPS65224 ) { nr_buck =ARRAY_SIZE (tps65224_buck_regs); nr_ldo =ARRAY_SIZE (tps65224_ldo_regs); - nr_types =REGS_INT_NB ; + nr_types =TPS65224_REGS_INT_NB ; }else { nr_buck =ARRAY_SIZE (buck_regs); nr_ldo =ARRAY_SIZE (tps6594_ldo_regs); - nr_types =TPS65224_REGS_INT_NB ; + nr_types =REGS_INT_NB ; } reg_irq_nb = nr_types * (nr_buck + nr_ldo); --
Signature · 2 lines
Regards Vignesh