Fwd: New Defects reported by Coverity Scan for Das U-Boot
Tom Rini
trini at konsulko.com
Tue May 12 20:38:42 CEST 2026
On Tue, May 12, 2026 at 10:44:46AM +0200, Christian Pötzsch wrote:
> Hi Tom,
>
> On 4/28/26 4:04 PM, Tom Rini wrote:
> > Here's the latest report.
[snip]
> > ** CID 645834: Control flow issues (NO_EFFECT)
> > /drivers/virtio/virtio_blk.c: 184 in virtio_blk_do_req()
> >
> >
> > _____________________________________________________________________________________________
> > *** CID 645834: Control flow issues (NO_EFFECT)
> > /drivers/virtio/virtio_blk.c: 184 in virtio_blk_do_req()
> > 178 */
> > 179 while (i < blkcnt) {
> > 180 u32 blk_per_sg = min(blkcnt - i, seg_sec_cnt * priv->seg_max);
> > 181
> > 182 ret = virtio_blk_do_single_req(dev, sector + i, blk_per_sg,
> > 183 buffer + i * 512, type);
> > > > > CID 645834: Control flow issues (NO_EFFECT)
> > > > > This less-than-zero comparison of an unsigned value is never true. "ret < 0UL".
> > 184 if (ret < 0)
> > 185 return ret;
> > 186 i += blk_per_sg;
> > 187 }
> > 188
> > 189 return blkcnt >> priv->blksz_shift;
> >
> > ** CID 645833: Control flow issues (DEADCODE)
> > /drivers/virtio/virtio_blk.c: 185 in virtio_blk_do_req()
> >
> >
> > _____________________________________________________________________________________________
> > *** CID 645833: Control flow issues (DEADCODE)
> > /drivers/virtio/virtio_blk.c: 185 in virtio_blk_do_req()
> > 179 while (i < blkcnt) {
> > 180 u32 blk_per_sg = min(blkcnt - i, seg_sec_cnt * priv->seg_max);
> > 181
> > 182 ret = virtio_blk_do_single_req(dev, sector + i, blk_per_sg,
> > 183 buffer + i * 512, type);
> > 184 if (ret < 0)
> > > > > CID 645833: Control flow issues (DEADCODE)
> > > > > Execution cannot reach this statement: "return ret;".
> > 185 return ret;
> > 186 i += blk_per_sg;
> > 187 }
> > 188
> > 189 return blkcnt >> priv->blksz_shift;
> > 190 }
> The last two errors should hopefully be fixed by https://patchwork.ozlabs.org/project/uboot/patch/20260512083949.3493010-1-christian.poetzsch@kernkonzept.com/
Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260512/e60c83d7/attachment-0001.sig>
More information about the U-Boot
mailing list