diff mbox series

thermal: sun8i: fix using plain integer as NULL pointer in sun8i_ths_resource_init

Message ID 20200112171318.23025-1-tiny.windzz@gmail.com (mailing list archive)
State Accepted
Delegated to: Daniel Lezcano
Headers show
Series thermal: sun8i: fix using plain integer as NULL pointer in sun8i_ths_resource_init | expand

Commit Message

Yangtao Li Jan. 12, 2020, 5:13 p.m. UTC
To fix:

drivers/thermal/sun8i_thermal.c:341:60: sparse: sparse: Using plain
integer as NULL pointer

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/thermal/sun8i_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Lezcano Jan. 12, 2020, 5:34 p.m. UTC | #1
On 12/01/2020 18:13, Yangtao Li wrote:
> To fix:
> 
> drivers/thermal/sun8i_thermal.c:341:60: sparse: sparse: Using plain
> integer as NULL pointer
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Applied, thanks

> ---
>  drivers/thermal/sun8i_thermal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index c5661d7c3e20..4bcde9491edb 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -338,7 +338,7 @@ static int sun8i_ths_resource_init(struct ths_device *tmdev)
>  		return PTR_ERR(tmdev->regmap);
>  
>  	if (tmdev->chip->has_bus_clk_reset) {
> -		tmdev->reset = devm_reset_control_get(dev, 0);
> +		tmdev->reset = devm_reset_control_get(dev, NULL);
>  		if (IS_ERR(tmdev->reset))
>  			return PTR_ERR(tmdev->reset);
>  
>
diff mbox series

Patch

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index c5661d7c3e20..4bcde9491edb 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -338,7 +338,7 @@  static int sun8i_ths_resource_init(struct ths_device *tmdev)
 		return PTR_ERR(tmdev->regmap);
 
 	if (tmdev->chip->has_bus_clk_reset) {
-		tmdev->reset = devm_reset_control_get(dev, 0);
+		tmdev->reset = devm_reset_control_get(dev, NULL);
 		if (IS_ERR(tmdev->reset))
 			return PTR_ERR(tmdev->reset);