drivers: can: allow NULL init function
Generic device API allows for NULL init function, do the same for I2C. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
40957e3b49
commit
1b73d1e0c6
|
@ -618,7 +618,11 @@ struct can_device_state {
|
|||
stats_init(&state->stats.s_hdr, STATS_SIZE_32, 7, \
|
||||
STATS_NAME_INIT_PARMS(can)); \
|
||||
stats_register(dev->name, &(state->stats.s_hdr)); \
|
||||
if (init_fn != NULL) { \
|
||||
return init_fn(dev); \
|
||||
} \
|
||||
\
|
||||
return 0; \
|
||||
}
|
||||
|
||||
/** @endcond */
|
||||
|
|
Loading…
Reference in a new issue