
driver inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/IC9UQB CVE: NA ---------------------------------------------------------------------- The caller checks the input parameters of the function uacce_alloc. The check is deleted because the uacce does not check the input parameters. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com> --- drivers/misc/uacce/uacce.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 8333a81343b9..a8517f4772c4 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -955,18 +955,14 @@ static void uacce_disable_sva(struct uacce_device *uacce) struct uacce_device *uacce_alloc(struct device *parent, struct uacce_interface *interface) { + unsigned int flags = interface->flags; struct uacce_device *uacce; - unsigned int flags; int ret; - if (!parent || !interface) - return ERR_PTR(-EINVAL); - uacce = kzalloc(sizeof(struct uacce_device), GFP_KERNEL); if (!uacce) return ERR_PTR(-ENOMEM); - flags = interface->flags; flags = uacce_enable_sva(parent, flags); uacce->parent = parent; -- 2.33.0