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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875xzgh7dr.fsf@geanix.com>
Date: Fri, 26 Jan 2024 08:38:08 +0100
From: Esben Haabendal <esben@...nix.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: linux-i2c@...r.kernel.org,  Gregor Herburger
 <gregor.herburger@...tq-group.com>,  Pengutronix Kernel Team
 <kernel@...gutronix.de>,  Andi Shyti <andi.shyti@...nel.org>,  Shawn Guo
 <shawnguo@...nel.org>,  Sascha Hauer <s.hauer@...gutronix.de>,  Fabio
 Estevam <festevam@...il.com>,  NXP Linux Team <linux-imx@....com>,
  linux-kernel@...r.kernel.org,  Jinjie Ruan <ruanjinjie@...wei.com>,
  Alexander Stein <alexander.stein@...tq-group.com>,
  linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] i2c: imx: move to generic GPIO recovery

Oleksij Rempel <o.rempel@...gutronix.de> writes:

> ....
>> +	struct i2c_bus_recovery_info *bri = &i2c_imx->rinfo;
>>  
>> -	dev_dbg(&pdev->dev, "using scl%s for recovery\n",
>> -		rinfo->sda_gpiod ? ",sda" : "");
>> +	bri->pinctrl = devm_pinctrl_get(&pdev->dev);
>> +	if (IS_ERR(bri->pinctrl))
>> +		return PTR_ERR(bri->pinctrl);
>
> According to the commit message - "pinctrl becomes optional", but this
> code stops probe if pinctrl will fail for one or another reason. I do
> not see any place returning NULL on fail. Do I'm missing something?

The caller, i2c_imx_probe(), does only check for -EPROBE_DEFER, and
simply ignores any other error codes.

I assume it is on purpose, so any problems with initializing i2c
recovery does not cause complete failure of the i2c controller, which
seems sane to me.

/Esben

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ