File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -632,10 +632,8 @@ static int atmci_of_init(struct atmel_mci *host)
632
632
u32 slot_id ;
633
633
int err ;
634
634
635
- if (!np ) {
636
- dev_err (dev , "device node not found\n" );
637
- return ERR_PTR (- EINVAL );
638
- }
635
+ if (!np )
636
+ return dev_err_probe (dev , - EINVAL , "device node not found\n" );
639
637
640
638
for_each_child_of_node (np , cnp ) {
641
639
if (of_property_read_u32 (cnp , "reg" , & slot_id )) {
@@ -2551,7 +2549,7 @@ static int atmci_probe(struct platform_device *pdev)
2551
2549
}
2552
2550
2553
2551
if (!nr_slots ) {
2554
- dev_err (dev , "init failed: no slot defined\n" );
2552
+ dev_err_probe (dev , ret , "init failed: no slot defined\n" );
2555
2553
goto err_init_slot ;
2556
2554
}
2557
2555
@@ -2560,8 +2558,7 @@ static int atmci_probe(struct platform_device *pdev)
2560
2558
& host -> buf_phys_addr ,
2561
2559
GFP_KERNEL );
2562
2560
if (!host -> buffer ) {
2563
- ret = - ENOMEM ;
2564
- dev_err (dev , "buffer allocation failed\n" );
2561
+ ret = dev_err_probe (dev , - ENOMEM , "buffer allocation failed\n" );
2565
2562
goto err_dma_alloc ;
2566
2563
}
2567
2564
}
You can’t perform that action at this time.
0 commit comments