mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-20 12:54:36 +08:00
media: imx-jpeg: Fix return value check in mxc_jpeg_attach_pm_domains()
In case of error, the function device_link_add() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.
Fixes: 2db16c6ed7
("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
fb3b597abd
commit
d75b32853d
@ -1943,8 +1943,8 @@ static int mxc_jpeg_attach_pm_domains(struct mxc_jpeg_dev *jpeg)
|
||||
DL_FLAG_STATELESS |
|
||||
DL_FLAG_PM_RUNTIME |
|
||||
DL_FLAG_RPM_ACTIVE);
|
||||
if (IS_ERR(jpeg->pd_link[i])) {
|
||||
ret = PTR_ERR(jpeg->pd_link[i]);
|
||||
if (!jpeg->pd_link[i]) {
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user