[PATCH] virtio: fix off by one device id comparison
Bin Meng
bmeng.cn at gmail.com
Mon Feb 15 11:04:52 CET 2021
On Mon, Feb 15, 2021 at 4:24 PM Vincent Stehlé
<vincent.stehle at laposte.net> wrote:
>
> VIRTIO_ID_MAX_NUM is the largest device ID plus 1. Therefore a device id
> cannot be greater or equal to VIRTIO_ID_MAX_NUM. Fix the comparison
> accordingly.
>
> Fixes: 8fb49b4c7a82 ("dm: Add a new uclass driver for VirtIO transport devices")
> Signed-off-by: Vincent Stehlé <vincent.stehle at laposte.net>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> ---
> drivers/virtio/virtio-uclass.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list