@@ -1368,19 +1368,13 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
1368
1368
int ret ;
1369
1369
1370
1370
ret = mtk_hdmi_get_all_clk (hdmi , np );
1371
- if (ret ) {
1372
- if (ret != - EPROBE_DEFER )
1373
- dev_err (dev , "Failed to get clocks: %d\n" , ret );
1374
-
1375
- return ret ;
1376
- }
1371
+ if (ret )
1372
+ return dev_err_probe (dev , ret , "Failed to get clocks\n" );
1377
1373
1378
1374
/* The CEC module handles HDMI hotplug detection */
1379
1375
cec_np = of_get_compatible_child (np -> parent , "mediatek,mt8173-cec" );
1380
- if (!cec_np ) {
1381
- dev_err (dev , "Failed to find CEC node\n" );
1382
- return - EINVAL ;
1383
- }
1376
+ if (!cec_np )
1377
+ return dev_err_probe (dev , - EINVAL , "Failed to find CEC node\n" );
1384
1378
1385
1379
cec_pdev = of_find_device_by_node (cec_np );
1386
1380
if (!cec_pdev ) {
@@ -1429,20 +1423,16 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
1429
1423
}
1430
1424
1431
1425
i2c_np = of_parse_phandle (remote , "ddc-i2c-bus" , 0 );
1426
+ of_node_put (remote );
1432
1427
if (!i2c_np ) {
1433
- dev_err (dev , "Failed to find ddc-i2c-bus node in %pOF\n" ,
1434
- remote );
1435
- of_node_put (remote );
1436
- ret = - EINVAL ;
1428
+ ret = dev_err_probe (dev , - EINVAL , "No ddc-i2c-bus in connector\n" );
1437
1429
goto put_device ;
1438
1430
}
1439
- of_node_put (remote );
1440
1431
1441
1432
hdmi -> ddc_adpt = of_find_i2c_adapter_by_node (i2c_np );
1442
1433
of_node_put (i2c_np );
1443
1434
if (!hdmi -> ddc_adpt ) {
1444
- dev_err (dev , "Failed to get ddc i2c adapter by node\n" );
1445
- ret = - EINVAL ;
1435
+ ret = dev_err_probe (dev , - EINVAL , "Failed to get ddc i2c adapter by node\n" );
1446
1436
goto put_device ;
1447
1437
}
1448
1438
0 commit comments