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:	Tue, 9 Jun 2015 10:57:56 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Irina Tirdea <irina.tirdea@...el.com>
Cc:	Bastien Nocera <hadess@...ess.net>,
	Mark Rutland <mark.rutland@....com>,
	linux-input@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Octavian Purdila <octavian.purdila@...el.com>
Subject: Re: [PATCH v2 4/8] input: goodix: reset device at init

Hi Irina,

On Mon, Jun 08, 2015 at 05:37:49PM +0300, Irina Tirdea wrote:
> +static int goodix_get_gpio_config(struct goodix_ts_data *ts)
> +{
> +	struct device *dev;
> +	struct gpio_desc *gpiod;
> +	int ret;
> +
> +	if (!ts->client)
> +		return -EINVAL;
> +	dev = &ts->client->dev;
> +
> +	/* Get interrupt GPIO pin number */
> +	gpiod = devm_gpiod_get(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN);
> +	if (IS_ERR(gpiod)) {
> +		ret = PTR_ERR(gpiod);
> +		dev_err(dev, "Failed to get %s GPIO: %d\n",
> +			GOODIX_GPIO_INT_NAME, ret);

You need to handle -EPROBE_DEFER (suppress error) and especially -ENOENT error
codes, otherwise, as Bastien mentioned, you will break existing DTS.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ