Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2075031rdd; Thu, 11 Jan 2024 20:24:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhu6unyOQNNldNQ6edfLetaVVcCH7XeuyCgjpotA8u+zzYHq5w7q/3hIZgxBMsd6z74kBK X-Received: by 2002:ac8:588c:0:b0:429:b5cb:ef31 with SMTP id t12-20020ac8588c000000b00429b5cbef31mr1112972qta.41.1705033468682; Thu, 11 Jan 2024 20:24:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705033468; cv=none; d=google.com; s=arc-20160816; b=HKwgN71ftA2m2CGwUCBbA96iJAI/U6+VycviVUQnD+DOc3hidLr25rmRwQFaZSVTLA jc87lEt8fHfGJrHs6W+VF5SjaK5Zsaa9czSWXlz+CGx70yo7PUQEmm2ixvTzsbjBVN5q nb9TboGtnEJp9kDT+9S+BZIpmBAozeI7hXdMnGdA8K/9+hq4SdF4K2PiAwz2DNvI2peC jkW/BeGMQ64KrI8927vtn14Aj/j6w1ZYxIza7HsbCE2lebBElULihnhIxOGYhHQRAgp5 8q5CzD+uj4pjKivyB1B27tzetJ/nlmmU+PtX+j6mmO6HeRvi7bLcPLJCVn5MHem1+EgJ bBeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=jg2/Kg/S9hFXThk8m061RwY0EU44YMSHxWpl9dR2B1I=; fh=QYNgVbAHqd8XolqjOyQsD/vh2TKdTnK7hfqthw6gQH8=; b=tgR5IBnSmUMcgR5bOzaM/wko73Uz8AXkL3G5QnzyKAg4r6C7C0RC5Lbem44J+8x102 ZcnZ2XsYK/Abj0Q+LJlqTwVNesIIYJLW5jOONvOZTMSyXq1dgPP/bIeZj2m0h9zxvH7K GWOGE9pG3oFjeZTdDScIWZYreuTYIyRj6/qpVkFFt2syqbQf6vbgwaukFOmSytCQG5cx Jubh99WSNR3QZvWUxN6uMzyKIgiM7bUndoEQMrTC4uUjP6Cne7vJLqUzyAxl7SoNJp8S mRoSvScCGbpjkiEvj/Iw5gyPAGC7eIHxOA6Adv7acBsp34ixseTzdoeKTiMj6YBYsQQs IZAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24286-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f1-20020ac87f01000000b00423dccd9929si2279490qtk.495.2024.01.11.20.24.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 20:24:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24286-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 723811C24B67 for ; Fri, 12 Jan 2024 04:24:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33B7A1B29F; Fri, 12 Jan 2024 04:24:17 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id B523B1B28E; Fri, 12 Jan 2024 04:24:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id 02C0C604F04A2; Fri, 12 Jan 2024 12:24:07 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: linus.walleij@linaro.org, brgl@bgdev.pl, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com Cc: Su Hui , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org Subject: [PATCH] gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe Date: Fri, 12 Jan 2024 12:24:04 +0800 Message-Id: <20240112042403.3940316-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Clang static checker warning: Value stored to 'ret' is never read. bgpio_init() returns error code if failed, it's better to add this check. Signed-off-by: Su Hui --- drivers/gpio/gpio-mlxbf3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-mlxbf3.c b/drivers/gpio/gpio-mlxbf3.c index 7a3e1760fc5b..d5906d419b0a 100644 --- a/drivers/gpio/gpio-mlxbf3.c +++ b/drivers/gpio/gpio-mlxbf3.c @@ -215,6 +215,8 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev) gs->gpio_clr_io + MLXBF_GPIO_FW_DATA_OUT_CLEAR, gs->gpio_set_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_SET, gs->gpio_clr_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_CLEAR, 0); + if (ret) + return dev_err_probe(dev, ret, "%s: bgpio_init() failed", __func__); gc->request = gpiochip_generic_request; gc->free = gpiochip_generic_free; -- 2.30.2