Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3938348pxj; Mon, 21 Jun 2021 09:46:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ96wDUzolcLLYDMUCYKRGRWxgCGnyGDlk4ZmJUWbpE1ajkaAKjnJdKhn7EyAVlYM4a4lG X-Received: by 2002:a05:6602:140e:: with SMTP id t14mr20599568iov.42.1624294008831; Mon, 21 Jun 2021 09:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294008; cv=none; d=google.com; s=arc-20160816; b=AmroHCUYx9snElapWtg5v1vSZy9aVHxL15L8XmG6D27Rnl5EWopc6lku/pc9MzRkFQ NC6f1xFyRm7I9TGGk8VoBcxt397Hfifszh3uFAFFIixLhqihShVybj9og3128YFxwU1e ftgzsDDa1pNLnCfUJLZrXZ+bAMxPObXkRfpf5LMxpoI5WXnDJAYGZLgiiOIRZQ/RZVbq mSGD3xo+fVFqHIxQM7iOwp1I/BlaVZKPcD4u9n96kLjLlsSYYHYiy2vdThm4pYRGaKCz GfIcktj2HZyPlG5YTNof5RgEQp27N2G1Oso+PhoHkx9fbjjzTQmEpYr21imNMb168+r4 tHBQ== 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=8CipB+zDIbqqZOAZoh+tAKf9E5ZrVOXC5M7lyQRxYPE=; b=hMubk9PApfC1+xRz66VbabJVrOPU1rthXvqe7gF6AcTg4YC+HTF9zFdsvru64Ulp0T snMOCD5tODugo2fF+O+DRjltH3pggbkKLJF/antQpledHh4BhrUvs5NV3wyxRJbVXa11 hAqR5jBtyblMyW+cbIDwwPqptFR1brEw6yU2vk29hUN/TViFU11mGZAW5zQ3q5PXmeI+ 8QtTlhQxa9f/sR6sKWEsWUMyh1UJ0Dwboc0G8Y/cGbsOyeodERAR1Qt3k1ZLfKvuO366 qf4vD6sXGDvjnQUlGOug9IFxuaCwzGNrG4iqYf33iKO978/Sc+2aZ6eW/q22WKmlJ10c CEyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h8/9GKEx"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m15si13446017ilh.26.2021.06.21.09.46.36; Mon, 21 Jun 2021 09:46:48 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h8/9GKEx"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232833AbhFUQsT (ORCPT + 99 others); Mon, 21 Jun 2021 12:48:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232645AbhFUQnp (ORCPT ); Mon, 21 Jun 2021 12:43:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6563161408; Mon, 21 Jun 2021 16:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293113; bh=Hn6slLGY2yBsJVVQ8oUX7UKd1PmXkOsRLGZvSfY9UXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h8/9GKExivVWm//D8rTu0D3JYPV9gsNavdMejEuDbwJZb2akFB9PTJti+/doVIKMb xM3nE7Ay9j8vSDcFHIwiHbe7uL5kPrGU9ia35/wUi08OVMLX5c1viBkJdwDPTUrY/F XEUFYhOTZGGYkF0Ce/ySoxqc93Djxziy76cVRhgA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergio Paracuellos , Linus Walleij , Sasha Levin Subject: [PATCH 5.12 104/178] pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled Date: Mon, 21 Jun 2021 18:15:18 +0200 Message-Id: <20210621154926.316269604@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sergio Paracuellos [ Upstream commit eb367d875f94a228c17c8538e3f2efcf2eb07ead ] In 'rt2880_pmx_group_enable' driver is printing an error and returning -EBUSY if a pin has been already enabled. This begets anoying messages in the caller when this happens like the following: rt2880-pinmux pinctrl: pcie is already enabled mt7621-pci 1e140000.pcie: Error applying setting, reverse things back To avoid this just print the already enabled message in the pinctrl driver and return 0 instead to not confuse the user with a real bad problem. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604055337.20407-1-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/ralink/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/ralink/pinctrl-rt2880.c b/drivers/pinctrl/ralink/pinctrl-rt2880.c index 1f4bca854add..a9b511c7e850 100644 --- a/drivers/pinctrl/ralink/pinctrl-rt2880.c +++ b/drivers/pinctrl/ralink/pinctrl-rt2880.c @@ -127,7 +127,7 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev, if (p->groups[group].enabled) { dev_err(p->dev, "%s is already enabled\n", p->groups[group].name); - return -EBUSY; + return 0; } p->groups[group].enabled = 1; -- 2.30.2