Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2928503iog; Mon, 27 Jun 2022 05:59:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tTrSMlchzbqeiQ1u23IX3cn/e0DWhnc2nV5mbsBL8i2sTeB7/Rfsz3AvwYu4DeezOWjQyR X-Received: by 2002:a17:903:2312:b0:16a:4a5b:a615 with SMTP id d18-20020a170903231200b0016a4a5ba615mr14440924plh.48.1656334762454; Mon, 27 Jun 2022 05:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656334762; cv=none; d=google.com; s=arc-20160816; b=REXIcqz+7/mvIRjaM+6V5kHdd8zx5iKcZoTAcNQFLVZBoCz4IEmRct46lnd1qh/Xgt NdF6MtJyvIXTFSVRvm7nRbxlIncD1GuXfkj3qbI7NUJZqetjEM2Ox/et+u5iGXJb4Lxd /zhqsBhlBVxAwTMwcOOPLSz2iUmykZMzuu7QdNk+XH6l8hj8OTxZ32QTzaCR62t+sK4m ByjkfVrhW7y6PXN5tWV7+25t4QmozC2s+3AUmvzGwzoG531gYAKzo5RamjZc5lJUQxwz 1vhnb7gNAsGZD+udrDAqsCRpyaQHVza5TOJ8udFadMP9dARg8yDrv2SYYTRFEGNmqpch Vbkg== 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=oG/NtpeZQb+4MTZTGOiYoH5Z4990yOeSnW6bXaF/Pws=; b=1Df1StutXDcNnEBsNJ6gpe8p4TpgUHq6pAHiSkYNSfiBkCf682z3B1Srj2wopoCH3I Y8d7AMGhxgbxi+ZrizzYRYEcg6hS/3wQSqi7mtTP0DJgkUGzYpx8Zd4PMoEKS4shCYwG P9zznuib8kw4j4Ong5O1qNZ97+QZJHLeQSeOOkNlVWj++iViP8HYIHPSCuNonjL90x3I 735ldwK8oqZ8a4cGcj/6piF5zHTyViU9pN1qZHb8Psr11UhtjgFi7zubofDH9cMh1O9x GcfprAORw/l16sT0YQsF4/H+rfx3X0ikiRn6ei4D9YSHiCcFdblUmd0PsbxIS7oSUz3d J4Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XI48GDAi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a170902714300b0016a1b60636bsi12760499plm.495.2022.06.27.05.59.09; Mon, 27 Jun 2022 05:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XI48GDAi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236777AbiF0Llz (ORCPT + 99 others); Mon, 27 Jun 2022 07:41:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236389AbiF0LiV (ORCPT ); Mon, 27 Jun 2022 07:38:21 -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 1A124BC8C; Mon, 27 Jun 2022 04:35:00 -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 A6B6D60DE9; Mon, 27 Jun 2022 11:34:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE528C3411D; Mon, 27 Jun 2022 11:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329699; bh=Hv5XT+wihpAxWcKTmxWkBoWJWkQXIxwXbE/EI2bjpSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XI48GDAiKusfm+iKGv5JEMGnmlCtZy8NXfS2FhsGimc8VuW0jYt7tnNZeRUzGydmo RsN3MUka5P1dFfc7TfJS8udM6U0Vc0bewsTh71Ugw8SA59rBkS9cqLCZ1lNrNP9Y2b dWo4V986G369+mtGseHTVr80vpbUB8uBDzI54tCI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Andy Shevchenko , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.15 078/135] gpio: winbond: Fix error code in winbond_gpio_get() Date: Mon, 27 Jun 2022 13:21:25 +0200 Message-Id: <20220627111940.424633379@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111938.151743692@linuxfoundation.org> References: <20220627111938.151743692@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=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Dan Carpenter [ Upstream commit 9ca766eaea2e87b8b773bff04ee56c055cb76d4e ] This error path returns 1, but it should instead propagate the negative error code from winbond_sio_enter(). Fixes: a0d65009411c ("gpio: winbond: Add driver") Signed-off-by: Dan Carpenter Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-winbond.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-winbond.c b/drivers/gpio/gpio-winbond.c index 7f8f5b02e31d..4b61d975cc0e 100644 --- a/drivers/gpio/gpio-winbond.c +++ b/drivers/gpio/gpio-winbond.c @@ -385,12 +385,13 @@ static int winbond_gpio_get(struct gpio_chip *gc, unsigned int offset) unsigned long *base = gpiochip_get_data(gc); const struct winbond_gpio_info *info; bool val; + int ret; winbond_gpio_get_info(&offset, &info); - val = winbond_sio_enter(*base); - if (val) - return val; + ret = winbond_sio_enter(*base); + if (ret) + return ret; winbond_sio_select_logical(*base, info->dev); -- 2.35.1