Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp620053pxb; Tue, 5 Apr 2022 16:11:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybs3MmKuXWhjlHzTNHcmLcAfU3Xdjb2LIqdgiajx+z+ay3WI6hm0beYrc/impYdjTWYQLB X-Received: by 2002:a17:90b:3ec8:b0:1c6:bf6a:19bc with SMTP id rm8-20020a17090b3ec800b001c6bf6a19bcmr6736777pjb.79.1649200267756; Tue, 05 Apr 2022 16:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649200267; cv=none; d=google.com; s=arc-20160816; b=W5BrqHKjq3UyRYXkVDALk/7g1ib+goXKeNizDRtuujHJhltkeXyjDD6POt81ll9rAc COKuTAJGijvA6cuV8QlhglDg+P2ZZAd463datDYNnzFmJaDTt05tOdCcndKGeJgZK/dw 8iYiAZdgJl37lP+ZvStFArnlMB9orC1yZc0pRvNuUpbnFvjDmd4NwoOd53Bh8eioDI/Q gHLkWqvYQEuYe/56J+3YbdXY2nf5ujRJy9RT786Q2ov6g4kmOK8g+DTITxv4Ny6oQuRB SYzohNUdmms6pO+xBJZkNBVrEnwlvkcYlsea2XGABSEoqAnubGNKdx6AS7LEk6jdwQcb M/CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qMLcpAPkZG/rmsMQmUjFSf9+ZU2Nwusg2RRDx9lOfZ4=; b=iXqT43bRiRh8O3YStUXZeoyLSOplqeaAOD6iah7AcVbV39LKQpPfzaFo1tB0IIN+CO GdYNJrsn3YMEHLm72sTCxOtYWrEqj4UOvGajH1EKbE15LRTH0zDQyws0S21HmHCxcH/Y CLUxau3BnpxrokYOmmVbOtnwnKnF5CBViKThbLVB3//2zNRa4w1J71kG9nWvM2tZWjL6 EXYUJ5KlL13wgzUj7CG9YfnEWyMQXlj742+CiTDH6b02hc3pi3BsABkCOwfItbdoa3WK peYHnJ2IaMfAaXNEGdexH6FDpmi0fgQDYME/+u5vqb5JBXKWZSchQI1kA6ahD4BxMUbi 8M7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gi8JsFgO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z24-20020a63e118000000b003816043eedbsi14697919pgh.208.2022.04.05.16.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:11:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gi8JsFgO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A58F580D1; Tue, 5 Apr 2022 15:54:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380743AbiDEMyH (ORCPT + 99 others); Tue, 5 Apr 2022 08:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343837AbiDEJOl (ORCPT ); Tue, 5 Apr 2022 05:14:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E02647394; Tue, 5 Apr 2022 02:00:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC9E761003; Tue, 5 Apr 2022 09:00:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C93BFC385A0; Tue, 5 Apr 2022 09:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149247; bh=3LxEPkMJu4WUWNwLsa7IzbFHRo3wh5QvDBNDMq0dVUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gi8JsFgOqiYj0cSmg7JI3vdc7y6fjOu5X3XAWsZsuzPMVQIDaF0x19BGkbDWS1OR5 BELJiE/9xpRc6CIrI/ZYF67qV07654baFVNgERT7poXg4F46mmhuiyrruXWNkgjIaB 7+aDFnzXWjAOANfr2kHWkpbx52LOstLrKr7upBc4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Rodolfo Giometti , Robert Hancock , Sasha Levin Subject: [PATCH 5.16 0648/1017] pps: clients: gpio: Propagate return value from pps_gpio_probe Date: Tue, 5 Apr 2022 09:26:01 +0200 Message-Id: <20220405070413.518743808@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Hancock [ Upstream commit abaca3179b41d4b3b115f27814ee36f6fb45e897 ] If the pps-gpio driver was probed prior to the GPIO device it uses, the devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe replaced that error code with -EINVAL, causing the pps-gpio probe to fail and not be retried later. Propagate the error return value so that deferred probe works properly. Fixes: 161520451dfa (pps: new client driver using GPIO) Reviewed-by: Andy Shevchenko Acked-by: Rodolfo Giometti Signed-off-by: Robert Hancock Signed-off-by: Rodolfo Giometti Link: https://lore.kernel.org/r/20220112205214.2060954-1-robert.hancock@calian.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/pps/clients/pps-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 35799e6401c9..2f4b11b4dfcd 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -169,7 +169,7 @@ static int pps_gpio_probe(struct platform_device *pdev) /* GPIO setup */ ret = pps_gpio_setup(dev); if (ret) - return -EINVAL; + return ret; /* IRQ setup */ ret = gpiod_to_irq(data->gpio_pin); -- 2.34.1