Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381937; b=QR3c9j+Sewh15VzLUeawJZ6Kj9D/IxOu++9cfqdkGt/R14+d7hrkowLvqGNUx3LcOSSm qUIa1dXOaPf7FdRtXfTF6sq9DRewweB6f6iT2Jpqyqzu5b0wMLNr7RS32ZopAOD8Ky8d5 q9kOLGWIJ8lWdZ+RFIjD0FIqmP3UqCUfDMA8gUCbztDJ9LtGGhfJE8fG/moCIl8nBpxXx 7+QFNLaywQ1oHUIejKVftjz6i3WaBi+iUEHSIhB1ly/da/MSWf/rEy/lL9FO46PeXHXMY LyNwzOPsAAMmlZLJ2/9Ct6pjL/cvhIC3H4G6N0KW67S/rzzPaCnqQJeaSalS2A3iwDw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381937; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=yBQx8odNckpQrm9foY6y5EmwFFb2sU0z5iiwFh9FvFA=; b=E2HzXhSc6S9WbzqW78H0ev0hlPYGE7QNwdL15KcQSeD7QRK1oHPeDebAyKrKVPCOZcNl YtBEgQ3TtgLNGNuWLXVEf+kxcXl3Q6gJsebwQOyvRr4UZUCPzSF9s31MPF+pwEguu96Vo HoSQxKNLnB8C1Vh3aCKnpSxY28ICf8b0WLZvdVbi5L3/BPJ5XWvg8RTU+1A4yyyddw4Xs zqp+eIKOfnuoWPKxUqjiWV3TCSObbgWIT3r8xcjG7aGtBp/bsrTmGcRcLNVLNZ+mZxgM8 BZTs7kKZXyjQSWDoFRDWtBN/6nVPwG+RianpBKekvvxrrEbCPcVnen7T6NWY0zSFdog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZMGbP4Mk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3AAF606A322; Fri, 4 Dec 2026 10:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZMGbP4Mk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 622931F000C2; Fri, 4 Dec 2026 10:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796381937; bh=yBQx8odNckpQrm9foY6y5EmwFFb2sU0z5iiwFh9FvFA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=ZMGbP4MkISYTml+ZYn/qnL5jzmuRD4ayeKkj9HLUrYUpnr3OLXSsQwF7VSz+1tBd1 vxB3INODJea+vBiGcQNbFye8hyn9N28m7xW6J+60SKkjyPaXk+s+BYpsZWLramlaJn nJb2HDLoYgl76qebb58oXfO//arCyZ4yuMmukIzYfB7vNNHxjdVlfBvESNwiir096/ uyJ2XepyR+B7NLRP4AUS23FiKU62gmQkl6DtrOf81J+LcjAQXmHjgI0uVQxMVF0ET/ o72Un5lpjkY9YB/D8OX/02VzUI4Y24y3bSy+963xT3QkKAnIHDnSd5zo2gSqSUn2X1 wsO4tAt4Bnlrg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v7 3/5] thermal/drivers/sun8i: get calibration data from two nvmem cells Reply-To: sashiko-reviews@lists.linux.dev To: "Mikhail Kalashnikov" Cc: devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <883618c8962e1457a9dbefe500ac9ceefc4cc67b.1796378254.git.iuncuim@gmail.com> References: <883618c8962e1457a9dbefe500ac9ceefc4cc67b.1796378254.git.iuncuim@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 10:58:56 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] thermal/sun8i: dead nvmem_cell_put() at out label in sun8i_ths_calibrate() -- commit 868b0257ac69107a99481c39419164e961cf6b23 Author: Mikhail Kalashnikov thermal/drivers/sun8i: get calibration data from two nvmem cells This commit updates sun8i_ths_calibrate() to iterate over all entries in the nvmem-cell-names property and concatenate their calibration data into a single buffer. > diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_ther= mal.c > index 1412bce630c0c..3606548801f02 100644 > --- a/drivers/thermal/sun8i_thermal.c > +++ b/drivers/thermal/sun8i_thermal.c > @@ -300,43 +300,68 @@ static int sun50i_h6_ths_calibrate(struct ths_devic= e *tmdev, > =20 > static int sun8i_ths_calibrate(struct ths_device *tmdev) > { > - struct nvmem_cell *calcell; > + struct nvmem_cell *calcell =3D NULL; [ ... ] > + caldatapart =3D nvmem_cell_read(calcell, &len); > + nvmem_cell_put(calcell); > + calcell =3D NULL; > + if (IS_ERR(caldatapart)) { > + ret =3D PTR_ERR(caldatapart); > + goto out; > + } [ ... ] > out: > - if (!IS_ERR(calcell)) > + if (!IS_ERR_OR_NULL(calcell)) > nvmem_cell_put(calcell); > return ret; > } [Severity: Low] Can this nvmem_cell_put() at the out label ever run? Every successful of_nvmem_cell_get() is immediately followed by nvmem_cell_put() and calcell =3D NULL, so calcell is always NULL or an ERR_PTR on reaching out, making this cleanup branch dead code. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1796378254.gi= t.iuncuim@gmail.com?part=3D3