Re: [PATCH v4] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2018-12-30 Thread David Miller
From: Peng Hao Date: Sat, 29 Dec 2018 16:47:32 +0800 > +static struct resource *ucc_get_resource_by_nodename(char *name) > +{ > + struct device_node *np; > + struct platform_device *pdev; > + > + np = of_find_compatible_node(NULL, NULL, name); > + if (!np) > + return E

[PATCH v4] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2018-12-29 Thread Peng Hao
From: Wen Yang Currently there are some issues with the ucc_of_parse_tdm function: 1, a possible null pointer dereference in ucc_of_parse_tdm, detected by the semantic patch deref_null.cocci, with the following warning: drivers/soc/fsl/qe/qe_tdm.c:177:21-24: ERROR: pdev is NULL but dereferenced.