LF-1510: gpu: drm: lcdifv3: null return value check for of_id
null return value check for of_id to reslove coverity ID 10058073. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com> Reviewed-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit c444dcf0aee821cf42892d03b698008bd1d6f0f5)5.4-rM2-2.2.x-imx-squashed
parent
5db279fcc5
commit
3119a403b7
|
@ -622,12 +622,19 @@ static int imx_lcdifv3_probe(struct platform_device *pdev)
|
|||
struct lcdifv3_soc *lcdifv3;
|
||||
struct resource *res;
|
||||
struct regmap *blk_ctl;
|
||||
const struct of_device_id *of_id =
|
||||
of_match_device(imx_lcdifv3_dt_ids, dev);
|
||||
const struct lcdifv3_soc_pdata *soc_pdata = of_id->data;
|
||||
const struct of_device_id *of_id;
|
||||
const struct lcdifv3_soc_pdata *soc_pdata;
|
||||
|
||||
dev_dbg(dev, "%s: probe begin\n", __func__);
|
||||
|
||||
of_id = of_match_device(imx_lcdifv3_dt_ids, dev);
|
||||
if (!of_id) {
|
||||
dev_err(&pdev->dev, "OF data missing\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
soc_pdata = of_id->data;
|
||||
|
||||
lcdifv3 = devm_kzalloc(dev, sizeof(*lcdifv3), GFP_KERNEL);
|
||||
if (!lcdifv3) {
|
||||
dev_err(dev, "Can't allocate 'lcdifv3_soc' structure\n");
|
||||
|
|
Loading…
Reference in New Issue