case 17:
if (!memcmp(elm->rxbuf, "UNABLE TO CONNECT", 17)) {
netdev_err(elm->dev,
- "The ELM327 reported UNABLE TO CONNECT. Please check your setup.\n");
+ "ELM327 reported UNABLE TO CONNECT. Please check your setup.\n");
}
break;
case 11:
break;
case 5:
if (!memcmp(elm->rxbuf, "ERR", 3)) {
- netdev_err(elm->dev, "The ELM327 reported an ERR%c%c. Please power it off and on again.\n",
+ netdev_err(elm->dev, "ELM327 reported an ERR%c%c. Please power it off and on again.\n",
elm->rxbuf[3], elm->rxbuf[4]);
frame.can_id |= CAN_ERR_CRTL;
}
* The main code will restart listening.
*/
elm327_kick_into_cmd_mode(elm);
- return 3;
+ return -ENODATA;
}
/* Use spaces in CAN ID to distinguish 29 or 11 bit address length.
/* This is not a well-formatted data line.
* Assume it's an error message.
*/
- return 1;
+ return -ENODATA;
}
if (hexlen < datastart) {
/* The line is too short to be a valid frame hex dump.
* Something interrupted the hex dump or it is invalid.
*/
- return 1;
+ return -ENODATA;
}
/* From here on all chars up to buf[hexlen] are hex or spaces,
* However, this will correctly drop the state machine back into
* command mode.
*/
- return 2;
+ return -ENODATA;
}
/* Parse the data nibbles. */
status = tty_register_ldisc(N_ELMCAN, &elmcan_ldisc);
if (status)
- pr_err("can't register line discipline\n");
+ pr_err("Can't register line discipline\n");
return status;
}