Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp440327rdb; Mon, 15 Jan 2024 02:12:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEg6JmGlus1KIaeQtJnAtXat0P/9TnLf/3AjNBpu9jIFZIRvQTmmWzc0lhvPFFffE2xTNib X-Received: by 2002:a05:620a:1a83:b0:783:645f:8853 with SMTP id bl3-20020a05620a1a8300b00783645f8853mr317593qkb.137.1705313548973; Mon, 15 Jan 2024 02:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705313548; cv=none; d=google.com; s=arc-20160816; b=L6UQaI0259oqPmGOlRxQ0sFCam2p+DPvk5avq2khhHh5EK/3D5QDsAH4aGewJSkh30 iQ0Cr0z4jfguyNF2ytnvCiSVQDUHhykWV5+kmmaD1BbffdHeDdbncly6iStmLRTfYZ2J s//ADWyoDHt2umJjQ8et0cQ+Ft62WfqvJDenApwNlmGLkMr3EsjNAWiN4pl86n0n0rNG srWfq+WDSSOhaHypi7/5W4E6EqCaveTjMoM3BFDNMMNLyb3Aj1J7Nf5lVwEhmSq+Kw2n aKPLHXPwn81yFmPo+IXXDMC1C6JlZ99tp9ZVjmsJXqwWjSYPSDx6g66jQNgFYTUTu67s 588Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=zn/IBVOWpMMRpEDU1Op72zgW/plcgEu56p6VAHHMjqg=; fh=vbQ/Cgxt6WAVorb/4Wf6spgseMrhmbNiSPogdHu7TnU=; b=kl/8xMX2NgIne+4JU5lEXjhCZDDRAxE6BRxEI9kvFwfuV58o2WpAJvfwRPlTgiQRUr bUBlNdh8D//5PZEujI/aIle+F4iTBC9G+wlxZlaIL7VwFTme016gK6nSRxQ7WqxX2QA4 NF+cRIW+2Rzt2Vj1bnaKWxYRJ8j/6jX72kfiGyXZ2MFUaeyGH1SXGDmAgb3yB9lwmWNj NVZC/CE8LskDVtYGaWCHqEPLNGH0EpQjMldJY29L4Jj2zrXdcnd55pILhVqkDSDVhBD8 vY2HWRDfkOX9n9lWpEn0EH9qFkdyRbXivF6jD7sGwYta6zA78PSZyV7+1LZUQAEQNc6Y XQtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Xo1i5YEz; spf=pass (google.com: domain of linux-kernel+bounces-25864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25864-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h22-20020a05620a13f600b007835bf24dd7si2082297qkl.268.2024.01.15.02.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 02:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Xo1i5YEz; spf=pass (google.com: domain of linux-kernel+bounces-25864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25864-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 7F7A61C2179C for ; Mon, 15 Jan 2024 10:12:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB902F9E8; Mon, 15 Jan 2024 10:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="Xo1i5YEz" Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E29B6F50A for ; Mon, 15 Jan 2024 10:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-4b857733f9aso1584769e0c.2 for ; Mon, 15 Jan 2024 02:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1705313540; x=1705918340; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zn/IBVOWpMMRpEDU1Op72zgW/plcgEu56p6VAHHMjqg=; b=Xo1i5YEzqP0+3DdJ5/ASe/O2PaW2LSM2D6iYN6QiVEtmIR2S4u9/PXfg45zNaQdi2n d5hKC527sw/NOJvemuSpzAyWGjaFi30VctRs5GPaMhIR1Nz0uY8luKdJeRvCsYBMoejF vZMhUV/XFWbASWxbdFF8YRzGl2MTLGFPhevWwMDz29ymZNRnB7WpNN6s4fAwiMONQF7O 7uQsb6XeW3jeRfLQSNhMw33YFfPuoi1anWuldQ0glcp58Vpl8eGn4/+5qqChNmtW0f0f gOOIhjy5w6t2Ot71uITylYGk1PqDMlou03VGjV721ZOzgUN7+jjGqhRKOzGPpBpuc6l8 yh8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705313540; x=1705918340; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zn/IBVOWpMMRpEDU1Op72zgW/plcgEu56p6VAHHMjqg=; b=OV98o73lhOinmYVUkg9V8kfJW+8V5Y591wXKOcviTNOJQm3ZMwgpM4hgmpi0oiiOgj pw9bTBxkJsGNnPLDjZHdqfKatR3DYs8f/vP093OUVAuL87ftREya02+IKvpfZxK8VnAT 3dHub8kAM4SZZwdILxPJI8QHrf2S5ibFvcpDc7JTXskmHI0zqk0SmnFACyn2qjiUEBkp ESunQz8BPZssijC9+9nLYPqJuFqfhxMmxS8aD/QuefjfAPwFmq3yUfHUhjdZxHCb12E8 Ta0SrW6nMYZiGGUIJZvWneEj9y6otPgA9ZVsoYbuaUDyefEqXPJIte/TrJgb3+eDS8or gJlw== X-Gm-Message-State: AOJu0YwIdcxgQdg+OpH7TCLfUQjH8TF1Fhw95CDQ7vEflgca7czLtJoU UgBYsullGno86Yl0WdnyyNd+4ooJ8kkZuHKeBVL0X9tOwTuzag== X-Received: by 2002:a05:6122:4304:b0:4b7:386:e209 with SMTP id cp4-20020a056122430400b004b70386e209mr1919852vkb.14.1705313539903; Mon, 15 Jan 2024 02:12:19 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240112042403.3940316-1-suhui@nfschina.com> In-Reply-To: <20240112042403.3940316-1-suhui@nfschina.com> From: Bartosz Golaszewski Date: Mon, 15 Jan 2024 11:12:09 +0100 Message-ID: Subject: Re: [PATCH] gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe To: Su Hui Cc: linus.walleij@linaro.org, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2024 at 5:24=E2=80=AFAM Su Hui wrote: > > 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_CLE= AR, 0); > + if (ret) > + return dev_err_probe(dev, ret, "%s: bgpio_init() failed",= __func__); > > gc->request =3D gpiochip_generic_request; > gc->free =3D gpiochip_generic_free; > -- > 2.30.2 > > I added the Fixes: tag and applied it. Bartosz