mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-17 07:54:54 +08:00
media: nxp: Fix wrong return pointer check in mxc_isi_crossbar_init()
It should check 'xbar->inputs', when allocate memory for it.
Cc: stable@vger.kernel.org
Fixes: cf21f328fc
("media: nxp: Add i.MX8 ISI driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
0ca2fbab99
commit
4b60db99ba
@ -483,7 +483,7 @@ int mxc_isi_crossbar_init(struct mxc_isi_dev *isi)
|
||||
|
||||
xbar->inputs = kcalloc(xbar->num_sinks, sizeof(*xbar->inputs),
|
||||
GFP_KERNEL);
|
||||
if (!xbar->pads) {
|
||||
if (!xbar->inputs) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user