Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753827AbbFIR61 (ORCPT ); Tue, 9 Jun 2015 13:58:27 -0400 Received: from mail-ie0-f194.google.com ([209.85.223.194]:34070 "EHLO mail-ie0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbbFIR6R (ORCPT ); Tue, 9 Jun 2015 13:58:17 -0400 Date: Tue, 9 Jun 2015 10:57:56 -0700 From: Dmitry Torokhov To: Irina Tirdea Cc: Bastien Nocera , Mark Rutland , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , Octavian Purdila Subject: Re: [PATCH v2 4/8] input: goodix: reset device at init Message-ID: <20150609175756.GI6338@dtor-ws> References: <1433774273-23103-1-git-send-email-irina.tirdea@intel.com> <1433774273-23103-5-git-send-email-irina.tirdea@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433774273-23103-5-git-send-email-irina.tirdea@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 941 Lines: 32 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/