Re: Re: [PATCH] agp: check if ndevs is zero before enabling node

2021-05-14 Thread Yiyuan GUO
From: Yiyuan GUO I guess it may only happen in theory, but maybe there is no harm in adding a simple check? Thanks.

[PATCH] agp: check if ndevs is zero before enabling node

2021-05-14 Thread Yiyuan GUO
ide by zero problems. Signed-off-by: Yiyuan GUO --- drivers/char/agp/isoch.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/char/agp/isoch.c b/drivers/char/agp/isoch.c index 7ecf20a6d..4c21bb057 100644 --- a/drivers/char/agp/isoch.c +++ b/drivers/char/agp/isoch.c @@ -

[PATCH v2] video/logo: protect against divide by zero when reading image

2021-05-14 Thread Yiyuan GUO
In video/logo/pnmtologo.c, the function read_image can read from the image file an integer 0 and pass it to function get_number255, leading to a divide by zero problem. Signed-off-by: Yiyuan GUO --- drivers/video/logo/pnmtologo.c | 14 -- 1 file changed, 12 insertions(+), 2