Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2909008iog; Mon, 27 Jun 2022 05:33:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v3Dfk76tH5H3QT8sF5kho1Wg1weivrUaWmraMI1NCWlNSZkKj/Qd4STC0zEvQlVoA5lPvR X-Received: by 2002:aa7:d38e:0:b0:435:6785:66d1 with SMTP id x14-20020aa7d38e000000b00435678566d1mr16030295edq.393.1656333225734; Mon, 27 Jun 2022 05:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333225; cv=none; d=google.com; s=arc-20160816; b=lGDRhOuS9q+/f0CMyU/Fi2qXHD/8relOy3JmECaNZ0z1l+zjxIaLeR80XAw9wLsyC0 SYp3yB6hNm8U4ry7yCj9j/xVLYeYaicRwSR9EcUMo2iVi8hC+f+uRYQrUu+VT22Lxfwh J/EKR7VtolpxXpyaWMnFjw4x9DMXQRimHPfvR6PdoR00lPYML86C6Z53ZgLzzZncHQik xzSqLjDCSC4oi1SubzyDBqbQSpEsvkuYc8OmAQ18P7Z4GbTEwAhKdNzlxzzP/Nvt5Wia YlIu1nZJFxIU+SsKLAWnbUBWYiJmlzZhjt6WmwYhuFoIKSRJFTuLEC9/QfU16zeYNJmb YJLQ== 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=OBdEB7eoIFXqvj064A4nUoXeoGfwpCDQpGGAkLAs+c8Fyh032JXzPK4edgHPJHeAJh PWb16XoZQsreFx304aOxOY9PQKp7RXa2nm636Sc6HnM2EeB9sg7+fNtN+zbzld22drVE KIOLkcS+Rw4wccPLMTUqB3CzHaOtIFVnBQFaATIXQJVbVUqS/aBmx/G9Ye3u7UFWZHz6 roOvLzbLyFSK8nGlHgL5pRJ76BOjczbecIPiiNOL+19XY/NolKBxIj7qdemRgOZ3prVT zK6zeboc6fsBmVXNjLNzXhNyq0Wj6XyL8thS22JXB8tKG9iJu7DWdrsjiNp6w9hPGfzB pUSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wyEcKAKw; 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 p7-20020a170906228700b007165339eb03si11136247eja.649.2022.06.27.05.33.21; Mon, 27 Jun 2022 05:33:45 -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=wyEcKAKw; 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 S235101AbiF0L0l (ORCPT + 99 others); Mon, 27 Jun 2022 07:26:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234883AbiF0LZu (ORCPT ); Mon, 27 Jun 2022 07:25:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E567640; Mon, 27 Jun 2022 04:25:35 -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 ams.source.kernel.org (Postfix) with ESMTPS id 96E84B8111E; Mon, 27 Jun 2022 11:25:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4C25C3411D; Mon, 27 Jun 2022 11:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329133; bh=Hv5XT+wihpAxWcKTmxWkBoWJWkQXIxwXbE/EI2bjpSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wyEcKAKwFgv9B9tghEPv5UXLc/Rk08llT/nWERqjBpVSup0DaxbwNiZhsuFyyEXSR CcmwA1c3VjAWwyhWEHKkyV8G7e6zJntuBE2mr7rjt81/FtVgraLp15umeEW/ve88nS yGwt3ykgmoQ1psdTruVylrq4YCwsdZTVxwAFX6vA= 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.10 061/102] gpio: winbond: Fix error code in winbond_gpio_get() Date: Mon, 27 Jun 2022 13:21:12 +0200 Message-Id: <20220627111935.281866515@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@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