diff mbox

pinctrl: rockchip: testing the wrong variable

Message ID 20131108100138.GO27977@elgon.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Nov. 8, 2013, 10:01 a.m. UTC
There is a copy and paste bug so we test "info->reg_base" instead of
"info->reg_pull".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I can't compile this.

Comments

Heiko Stübner Nov. 8, 2013, 11:44 a.m. UTC | #1
Am Freitag, 8. November 2013, 11:01:38 schrieb Dan Carpenter:
> There is a copy and paste bug so we test "info->reg_base" instead of
> "info->reg_pull".
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks for the catch

Acked-by: Heiko Stuebner <heiko@sntech.de>

> ---
> I can't compile this.
> 
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c
> b/drivers/pinctrl/pinctrl-rockchip.c index e939c28..fe2ec1b 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -1453,8 +1453,8 @@ static int rockchip_pinctrl_probe(struct
> platform_device *pdev) if (ctrl->type == RK3188) {
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>  		info->reg_pull = devm_ioremap_resource(&pdev->dev, res);
> -		if (IS_ERR(info->reg_base))
> -			return PTR_ERR(info->reg_base);
> +		if (IS_ERR(info->reg_pull))
> +			return PTR_ERR(info->reg_pull);
>  	}
> 
>  	ret = rockchip_gpiolib_register(pdev, info);
Linus Walleij Nov. 19, 2013, 7:56 a.m. UTC | #2
On Fri, Nov 8, 2013 at 11:01 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> There is a copy and paste bug so we test "info->reg_base" instead of
> "info->reg_pull".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied for fixes with Heiko's ACK.

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index e939c28..fe2ec1b 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -1453,8 +1453,8 @@  static int rockchip_pinctrl_probe(struct platform_device *pdev)
 	if (ctrl->type == RK3188) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 		info->reg_pull = devm_ioremap_resource(&pdev->dev, res);
-		if (IS_ERR(info->reg_base))
-			return PTR_ERR(info->reg_base);
+		if (IS_ERR(info->reg_pull))
+			return PTR_ERR(info->reg_pull);
 	}
 
 	ret = rockchip_gpiolib_register(pdev, info);