Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3918606pxj; Mon, 21 Jun 2021 09:21:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUK/h4lIvKFGjopL75bhwT9ICtBeBAORMEqBpBpPNT74kFT7mXArUVVsP2BE2DUll11WEs X-Received: by 2002:aa7:dd43:: with SMTP id o3mr22394310edw.302.1624292481127; Mon, 21 Jun 2021 09:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292481; cv=none; d=google.com; s=arc-20160816; b=cToZ1ZwNpsDHhsPgsDrHqLrQsXttgrtt1myiQTXnr3gL9D9Q9hJ6MKkhvp8gApwrYF 6gXBDDaYklOEtI8Kt97Gc4VAILiPvciLA47Jm0BPbUFtRAWPDaWAOAfeWshwjX1FpiIa sjNVrQJZ7vkPlFIVy1YsLl9MEgp2OlbJ3u/GA/sGTrK28l+sVdbhBT6vErYNsGbCNSSn 39azyfegRNRlMV7DM7VcryrGYOp3cJILAzvxLLZ6ieT8n2X9P9VGISeUeLTJwiuExnPj g6mPVPQe7wK5bW/51oHCLi48V6VeB8iKO3VeQWkX0Tc7DZoK06AUyfhwIFPKAnwWZb49 H4cA== 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=XC0n+Rox2WkRU4XhYE0EBLdx2SjyVeq1VEDfMzdEtYY=; b=JIBuBHO0fQh/QA/lnLmdMOOKC1jSStdbCVjnV8/f+p5UpAaHHhFcG0y6I77lw0s+q1 qmSxm38xkI3FQTMea0GttHmHeTNrvP0laURg+UURcyl+nUPv9YRr6jN2grlJl68JT68v urFsq3PRnGWYRl3eNe+EisTBDvv1vPMtHz909XTMBwOYC0j5+V+I593oWwev00z9FgXy UzmKp/DQFUyneejYesn+pX5VoNI+Tdh5yP4mBsz3QB+nRzYYQettjs+k94OS0DBE8aT4 hLDob+zfEERnPTNDloqPNebuy/TclBITc+fHqkCb727RWeO5CvtHeovw8me2ek4wR47h N+Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=USdokBCq; 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 zd7si4893243ejb.406.2021.06.21.09.20.58; Mon, 21 Jun 2021 09:21:21 -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=USdokBCq; 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 S231132AbhFUQVz (ORCPT + 99 others); Mon, 21 Jun 2021 12:21:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbhFUQUu (ORCPT ); Mon, 21 Jun 2021 12:20:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0A24E611CE; Mon, 21 Jun 2021 16:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292315; bh=TLQXXMRgCJYZjDlvNmaC2ZBnYfPNzA9DrlkZNPcYHKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=USdokBCq2S36DMkLugXpIjO/2xfnKufgLFfaB09KdDTM+jbpAZ0ACqw9m4cdqL2ps VC4u92KlKYA/h0ADXYRoXOEBU2tXovDKpG5KD1wh8qMVsk6pd9eUQtfoDJtbWfCxfE srHTLwG/3PaT9vt1xjaxDE3agIss728mfNBXSTH0= 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.4 46/90] pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled Date: Mon, 21 Jun 2021 18:15:21 +0200 Message-Id: <20210621154905.687271111@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index d0f06790d38f..0ba4e4e070a9 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/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