This should really check that ````adc_dev->driver->get_pin```` is not NULL before dereferencing it.