lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Sep 2023 23:22:23 +0200
From:   Andi Shyti <andi.shyti@...nel.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-renesas-soc@...r.kernel.org,
        Philipp Zabel <p.zabel@...gutronix.de>,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] i2c: rcar: reset controller is mandatory for Gen3+

Hi Wolfram,

[...]

>  		irqhandler = rcar_i2c_gen2_irq;
>  	}
>  
> -	if (priv->devtype == I2C_RCAR_GEN3) {
> -		priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> -		if (!IS_ERR(priv->rstc)) {
> -			ret = reset_control_status(priv->rstc);
> -			if (ret < 0)
> -				priv->rstc = ERR_PTR(-ENOTSUPP);
> -		}
> -	}
> -
>  	/* Stay always active when multi-master to keep arbitration working */
>  	if (of_property_read_bool(dev->of_node, "multi-master"))
>  		priv->flags |= ID_P_PM_BLOCKED;
> @@ -1112,6 +1101,16 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>  	if (of_property_read_bool(dev->of_node, "smbus"))
>  		priv->flags |= ID_P_HOST_NOTIFY;
>  
> +	if (priv->devtype == I2C_RCAR_GEN3) {
> +		priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> +		if (IS_ERR(priv->rstc))
> +			goto out_pm_put;
> +
> +		ret = reset_control_status(priv->rstc);
> +		if (ret < 0)
> +			goto out_pm_put;
> +	}
> +

you moved this block to avoid the pm_runtime_put(dev);

Looks good!

Reviewed-by: Andi Shyti <andi.shyti@...nel.org> 

Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ