Lines Matching refs:error

148 	int error;  in check_plugged_state_change()  local
156 error = device_attach(&mc_dev->dev); in check_plugged_state_change()
157 if (error < 0) { in check_plugged_state_change()
160 error); in check_plugged_state_change()
172 int error; in fsl_mc_obj_device_add() local
183 error = fsl_mc_device_add(obj_desc, NULL, &mc_bus_dev->dev, in fsl_mc_obj_device_add()
185 if (error < 0) in fsl_mc_obj_device_add()
250 int error; in dprc_scan_objects() local
255 error = dprc_get_obj_count(mc_bus_dev->mc_io, in dprc_scan_objects()
259 if (error < 0) { in dprc_scan_objects()
261 error); in dprc_scan_objects()
262 return error; in dprc_scan_objects()
283 error = dprc_get_obj(mc_bus_dev->mc_io, in dprc_scan_objects()
287 if (error < 0) { in dprc_scan_objects()
290 i, error); in dprc_scan_objects()
296 obj_desc->id = error; in dprc_scan_objects()
335 error = fsl_mc_populate_irq_pool(mc_bus_dev, in dprc_scan_objects()
337 if (error < 0) in dprc_scan_objects()
338 return error; in dprc_scan_objects()
367 int error = 0; in dprc_scan_container() local
376 error = dprc_scan_objects(mc_bus_dev, alloc_interrupts); in dprc_scan_container()
379 return error; in dprc_scan_container()
402 int error; in dprc_irq0_handler_thread() local
421 error = dprc_get_irq_status(mc_io, 0, mc_dev->mc_handle, 0, in dprc_irq0_handler_thread()
423 if (error < 0) { in dprc_irq0_handler_thread()
425 "dprc_get_irq_status() failed: %d\n", error); in dprc_irq0_handler_thread()
429 error = dprc_clear_irq_status(mc_io, 0, mc_dev->mc_handle, 0, in dprc_irq0_handler_thread()
431 if (error < 0) { in dprc_irq0_handler_thread()
433 "dprc_clear_irq_status() failed: %d\n", error); in dprc_irq0_handler_thread()
443 error = dprc_scan_objects(mc_dev, true); in dprc_irq0_handler_thread()
444 if (error < 0) { in dprc_irq0_handler_thread()
451 if (error != -ENXIO) { in dprc_irq0_handler_thread()
453 error); in dprc_irq0_handler_thread()
471 int error; in disable_dprc_irq() local
477 error = dprc_set_irq_enable(mc_io, 0, mc_dev->mc_handle, 0, 0); in disable_dprc_irq()
478 if (error < 0) { in disable_dprc_irq()
481 error); in disable_dprc_irq()
482 return error; in disable_dprc_irq()
488 error = dprc_set_irq_mask(mc_io, 0, mc_dev->mc_handle, 0, 0x0); in disable_dprc_irq()
489 if (error < 0) { in disable_dprc_irq()
492 error); in disable_dprc_irq()
493 return error; in disable_dprc_irq()
499 error = dprc_clear_irq_status(mc_io, 0, mc_dev->mc_handle, 0, ~0x0U); in disable_dprc_irq()
500 if (error < 0) { in disable_dprc_irq()
503 error); in disable_dprc_irq()
504 return error; in disable_dprc_irq()
521 int error; in register_dprc_irq_handler() local
528 error = devm_request_threaded_irq(&mc_dev->dev, in register_dprc_irq_handler()
535 if (error < 0) { in register_dprc_irq_handler()
538 error); in register_dprc_irq_handler()
539 return error; in register_dprc_irq_handler()
548 int error; in enable_dprc_irq() local
553 error = dprc_set_irq_mask(mc_dev->mc_io, 0, mc_dev->mc_handle, 0, in enable_dprc_irq()
555 if (error < 0) { in enable_dprc_irq()
558 error); in enable_dprc_irq()
560 return error; in enable_dprc_irq()
566 error = dprc_set_irq_enable(mc_dev->mc_io, 0, mc_dev->mc_handle, 0, 1); in enable_dprc_irq()
567 if (error < 0) { in enable_dprc_irq()
570 error); in enable_dprc_irq()
572 return error; in enable_dprc_irq()
585 int error; in dprc_setup_irq() local
587 error = fsl_mc_allocate_irqs(mc_dev); in dprc_setup_irq()
588 if (error < 0) in dprc_setup_irq()
589 return error; in dprc_setup_irq()
591 error = disable_dprc_irq(mc_dev); in dprc_setup_irq()
592 if (error < 0) in dprc_setup_irq()
595 error = register_dprc_irq_handler(mc_dev); in dprc_setup_irq()
596 if (error < 0) in dprc_setup_irq()
599 error = enable_dprc_irq(mc_dev); in dprc_setup_irq()
600 if (error < 0) in dprc_setup_irq()
607 return error; in dprc_setup_irq()
629 int error; in dprc_setup() local
649 error = fsl_create_mc_io(&mc_dev->dev, in dprc_setup()
655 if (error < 0) in dprc_setup()
656 return error; in dprc_setup()
660 error = fsl_mc_uapi_create_device_file(mc_bus); in dprc_setup()
661 if (error < 0) in dprc_setup()
675 error = dprc_open(mc_dev->mc_io, 0, mc_dev->obj_desc.id, in dprc_setup()
677 if (error < 0) { in dprc_setup()
678 dev_err(&mc_dev->dev, "dprc_open() failed: %d\n", error); in dprc_setup()
682 error = dprc_get_attributes(mc_dev->mc_io, 0, mc_dev->mc_handle, in dprc_setup()
684 if (error < 0) { in dprc_setup()
686 error); in dprc_setup()
690 error = dprc_get_api_version(mc_dev->mc_io, 0, in dprc_setup()
693 if (error < 0) { in dprc_setup()
695 error); in dprc_setup()
703 error = -ENOTSUPP; in dprc_setup()
724 return error; in dprc_setup()
740 int error; in dprc_probe() local
742 error = dprc_setup(mc_dev); in dprc_probe()
743 if (error < 0) in dprc_probe()
744 return error; in dprc_probe()
749 error = dprc_scan_container(mc_dev, true); in dprc_probe()
750 if (error < 0) in dprc_probe()
756 error = dprc_setup_irq(mc_dev); in dprc_probe()
757 if (error < 0) in dprc_probe()
767 return error; in dprc_probe()
796 int error; in dprc_cleanup() local
819 error = dprc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); in dprc_cleanup()
820 if (error < 0) in dprc_cleanup()
821 dev_err(&mc_dev->dev, "dprc_close() failed: %d\n", error); in dprc_cleanup()