Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2526946rbb; Wed, 28 Feb 2024 04:54:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUN6Xq3NEukCJryeE5aM5kGBd0ytr2PDWAu11vf2kg+eYvPUDYa2mFbwf6V1UsQ9uvl1LksOiQ8D6KNW44XavwqADSlMbNDQmz0bYiSDQ== X-Google-Smtp-Source: AGHT+IHoRbvt80hVuK2O+q1lSWXLQXMPFn+qiKHefvZ1lPFEcVsLRBCfyIpu4c60r6pKjVcM+xxl X-Received: by 2002:a05:620a:3b99:b0:787:7cc6:4424 with SMTP id ye25-20020a05620a3b9900b007877cc64424mr4811709qkn.8.1709124881585; Wed, 28 Feb 2024 04:54:41 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j25-20020a05620a0a5900b00787b4fabbeasi9779036qka.59.2024.02.28.04.54.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 04:54:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85043-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=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=DqiWmt8a; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-85043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 58A6F1C23346 for ; Wed, 28 Feb 2024 12:54:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F1BA149DFC; Wed, 28 Feb 2024 12:53:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DqiWmt8a" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 233C9145B27; Wed, 28 Feb 2024 12:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709124832; cv=none; b=ZX3G2ORGXoDD/jJtuqWCLWrRLEi5R3OkjVCOAqr+byHskql9rIfwCCJbF+18WHt3my9WyYxlDpow68H1D36lkwxgaVSLnkFnHc7BW8WM+cb8GsKdGa1eI4Fowbj++FioiE2978rIr/V+VjamFqS6aOCRCjPx8kN9ggdUXCi5Phc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709124832; c=relaxed/simple; bh=hnckyr9CzJCyvSre06+L3PLt3fvc2S88cMfyIGRjMdU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ie3P8IFq/RJvOJ57pPSon9M0+Ou4WRMJfTlU7lsMqfD+Je6Eu16tNMfbUaCWfLTjv0bhStWjdm1yeAS8sSL4RfkyiK/+9N5TyaTD87+Y5Lhp92zVd3GvA2IIQ7/ZS2a9vdCgfP3ZLVTuFDZ4HnIK4zVtMq/KATYhb+/ZVfjunDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DqiWmt8a; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21E50C433F1; Wed, 28 Feb 2024 12:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709124831; bh=hnckyr9CzJCyvSre06+L3PLt3fvc2S88cMfyIGRjMdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DqiWmt8afGNGKTglMVNXTBYEU7fUZPKVfOCmzRyjEB9rnkGIawsMCpGR7XBaoKNWS nMdiNr4SpNF+zJCiJhC8aPZTkLgvuaaq9ILWgWP8Nm70Dge+L5auiBcsWE5L2kVTA0 gsFDVaCiYqhD34Wpmgxoaw6SsgRnEr2LnMNa3n8xa0wufr8tcRhH2V7oKzmnRM5nwB /SkeH92K8kgx9zWFc+pDSSZzaQSy8ZJ2gX3UXQaj8tCr3/lIq02M5V2FRQdlAfhgdm re7dNUuCXvg9ilq3OVX2kQM26FhoWykZomTSV0BMSo0JpkuHeqFGg29FFuasgBrjRy 303cbhKn19B+Q== Date: Wed, 28 Feb 2024 12:53:44 +0000 From: Simon Horman To: Kory Maincent Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksij Rempel , Mark Brown , Frank Rowand , Andrew Lunn , Heiner Kallweit , Russell King , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v5 17/17] net: pse-pd: Add TI TPS23881 PSE controller driver Message-ID: <20240228125344.GD292522@kernel.org> References: <20240227-feature_poe-v5-0-28f0aa48246d@bootlin.com> <20240227-feature_poe-v5-17-28f0aa48246d@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240227-feature_poe-v5-17-28f0aa48246d@bootlin.com> On Tue, Feb 27, 2024 at 03:42:59PM +0100, Kory Maincent wrote: > Add a new driver for the TI TPS23881 I2C Power Sourcing Equipment > controller. > > This patch is sponsored by Dent Project . > > Signed-off-by: Kory Maincent .. > +static int tps23881_flash_fw_part(struct i2c_client *client, > + const char *fw_name, > + const struct tps23881_fw_conf *fw_conf) > +{ > + const struct firmware *fw = NULL; > + int i, ret; > + > + ret = request_firmware(&fw, fw_name, &client->dev); > + if (ret) > + return ret; > + > + dev_info(&client->dev, "Flashing %s\n", fw_name); > + > + /* Prepare device for RAM download */ > + while (fw_conf->reg) { > + ret = i2c_smbus_write_byte_data(client, fw_conf->reg, > + fw_conf->val); > + if (ret < 0) Hi Kory, Should fw be released here. > + return ret; > + > + fw_conf++; > + } > + > + /* Flash the firmware file */ > + for (i = 0; i < fw->size; i++) { > + ret = i2c_smbus_write_byte_data(client, > + TPS23881_REG_SRAM_DATA, > + fw->data[i]); > + if (ret < 0) And here? Flagged by Smatch. > + return ret; > + } > + > + release_firmware(fw); > + > + return 0; > +} ..