[PATCH] fbdev: fbmon: fix potential divide error in fb_validate_mode

2023-10-14 Thread Zhang Shurong
We can easily use FBIOPUT_VSCREENINFO set fb_var_screeninfo, so it's possible for a divide by zero error to occur. Fix this by making sure the divisor is non-zero before the computation. Signed-off-by: Zhang Shurong --- drivers/video/fbdev/core/fbmon.c | 3 +++ 1 file changed, 3 inser

Re: [PATCH] video: fbdev: arkfb: fix possible object reference leak

2023-10-06 Thread Zhang Shurong
test this patch. Thank you and best regards, Shurong On 2023/10/6 16:09, Helge Deller wrote: On 10/5/23 09:01, Zhang Shurong wrote: Add missing pci_disable_device() in error path in ark_pci_probe(). Do you have this hardware and tested your patch? I'm sure there is a reason, why &quo

[PATCH] video: fbdev: arkfb: fix possible object reference leak

2023-10-05 Thread Zhang Shurong
Add missing pci_disable_device() in error path in ark_pci_probe(). Signed-off-by: Zhang Shurong --- drivers/video/fbdev/arkfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c index 60a96fdb5dd8..6c4e5065646f

[PATCH] drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe

2023-10-04 Thread Zhang Shurong
pm_runtime_disable and pm_runtime_put_sync when error returns. Fixes: 82b81b3ec1a7 ("drm/tegra: dpaux: Implement runtime PM") Signed-off-by: Zhang Shurong --- drivers/gpu/drm/tegra/dpaux.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tegra

Re: [PATCH] drm/bridge: imx: fix potential NULL pointer dereference in imx8qxp_ldb_parse_dt_companion()

2023-08-28 Thread Zhang Shurong
在 2023年8月29日星期二 CST 上午1:28:22,Laurent Pinchart 写道: > Hi Zhang, > > Thank you for the patch. > > On Tue, Aug 29, 2023 at 12:55:01AM +0800, Zhang Shurong wrote: > > of_match_device() may fail and returns a NULL pointer. > > How can it return a NULL pointer here ? >

[PATCH] drm/bridge: imx: fix potential NULL pointer dereference in imx8qxp_ldb_parse_dt_companion()

2023-08-28 Thread Zhang Shurong
of_match_device() may fail and returns a NULL pointer. Fix this by checking the return value of of_match_device(). Fixes: 3818715f62b4 ("drm/bridge: imx: Add LDB support for i.MX8qxp") Signed-off-by: Zhang Shurong --- drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c | 2 ++ 1 file

[PATCH] spi: tegra: Fix missing IRQ check in tegra_slink_probe()

2023-08-27 Thread Zhang Shurong
("spi: tegra: add spi driver for SLINK controller") Signed-off-by: Zhang Shurong --- drivers/spi/spi-tegra20-slink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 4d6db6182c5e..f5cd365c913a 100644 --- a/

[PATCH] fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe

2023-07-15 Thread Zhang Shurong
a8312 ("au1200fb: fix hardcoded IRQ") Signed-off-by: Zhang Shurong --- drivers/video/fbdev/au1200fb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 5c232eb13724..c137d6afe484 100644 --- a/drivers/video/fbdev/a