Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2471651pxb; Tue, 9 Mar 2021 03:28:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDY5SDzaERoJ/QEw4hdhZfhc+hI6vXiR1lkb2YY/byNP5umfmCy7xsXzghllyHOS5+FR32 X-Received: by 2002:a05:6402:1c1b:: with SMTP id ck27mr3498961edb.223.1615289284790; Tue, 09 Mar 2021 03:28:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615289284; cv=none; d=google.com; s=arc-20160816; b=lRvI1k2SKylcyoKyX/BzrKgPPf2SQNCVcQEig72n+3spHR3gtmjqa9xZF5+HLBxMrN o/CqOaci2njFvn72/pfbaZkK29ZWMcYIsfrLIG8HGoCAW7nUKE8GcKrV1xAoHnG5TYui YG6Wx5Idu/qREPQliNRbeKesNdzcWPqkSBFQDpYHXuGk8OXMMN7BsBps8dClZfb6QhtI yVIUDV0I9doEaGFcHcgAj4MYwkH0zGUhx6gs4A+aqViVbGZQDhPiny7/Ldf/XzLhbcrI VavYCU5ZNrnPfEprA3a/go1aqLoI4+cJPmxUs8HRClk0gciUkvyWqJKXzGurDtVxIQuY 9Q/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=j4O4hP0bX1WdxMjpF13McKx00zB5PGzTtR7rrxbnSTY=; b=wyC7VnT0bIRR5t6eOiWEM8VLzCnMVOe7f9ixYIumw4rQ2yQzMnYSIaAGTfuSjCaCyj FvXI2UibOoVcuOA9F7WcEKv9TZDSyXw5mVu53JudjCLyklq3tAF1M28vsoR4JEiqRGiP JG51ASbogpXnHcQ2PhtkZi1XdN5TtXWcC8aGq5EolqMWrLEgNeH+HfPFuM5XbRo+Muo2 6yfOAzw/7plIoK3pDSADWDQtrHiAznbgCVUlKu/D6zWcYxQVbF0NIjddPExPr1eahvaW lUhXYz/L2QLY1nBKnxDiegJpY22i5ZQouhoChzVCFnFbsoZdKChYmXzHOlYGLzOxwTLg Rsog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si8592815eju.671.2021.03.09.03.27.41; Tue, 09 Mar 2021 03:28:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbhCILYp (ORCPT + 99 others); Tue, 9 Mar 2021 06:24:45 -0500 Received: from mga01.intel.com ([192.55.52.88]:41542 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbhCILYW (ORCPT ); Tue, 9 Mar 2021 06:24:22 -0500 IronPort-SDR: srbLZq1z1PzsKoqaAXEaWW6CAZH/1UjZFMtctOVL9A9lkG1znLoSrmICI5hdN2tdnHOdgMUsoA A+jqJF8cYQrw== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="207987902" X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="207987902" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2021 03:24:20 -0800 IronPort-SDR: iu3pPFhufT3eE8F61ZkGDSuw66Ee6s2XXS5pblTWjohPH3I5IInaCRuIYPbe9aLT26xyQaYoNo 50L6MFVbuDPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="408609069" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 09 Mar 2021 03:24:17 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7CE53490; Tue, 9 Mar 2021 13:24:18 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Rodolfo Giometti , Ryan Govostes , Greg Kroah-Hartman Subject: [PATCH resend v1 3/7] pps: clients: gpio: Remove redundant condition in ->remove() Date: Tue, 9 Mar 2021 13:23:59 +0200 Message-Id: <20210309112403.36633-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> References: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The timer along with GPIO API are NULL-aware, there is no need to test against existing GPIO echo line. Signed-off-by: Andy Shevchenko --- drivers/pps/clients/pps-gpio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 78c9680e8063..dc9ed6fc3dae 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -240,11 +240,9 @@ static int pps_gpio_remove(struct platform_device *pdev) struct pps_gpio_device_data *data = platform_get_drvdata(pdev); pps_unregister_source(data->pps); - if (data->echo_pin) { - del_timer_sync(&data->echo_timer); - /* reset echo pin in any case */ - gpiod_set_value(data->echo_pin, 0); - } + del_timer_sync(&data->echo_timer); + /* reset echo pin in any case */ + gpiod_set_value(data->echo_pin, 0); dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq); return 0; } -- 2.30.1