+static int __init da850_evm_pruss_can_setup(void)
+{
+ int ret, val = 0;
+ void __iomem *cfg_chip3_reg;
+
+ ret = davinci_cfg_reg_list(da850_evm_pruss_can_pins);
+ if (ret)
+ pr_warning("%s: da850_evm_pruss_can_pins mux setup "
+ "failed:%d\n", __func__, ret);
Yet you continue to initialize... you should stop here I think.
+ /* value = 0 to enable the CAN transceiver */
+ ret = gpio_request_one(DA850_PRUSS_CAN_TRX_PIN,
+ GPIOF_OUT_INIT_LOW, "pruss_can_en");
+ if (ret) {
+ pr_warning("Cannot setup GPIO %d\n", DA850_PRUSS_CAN_TRX_PIN);
+ gpio_free(DA850_PRUSS_CAN_TRX_PIN);
Doesn't gpio_request_one() handle freeing GPIO on error?