In case that the file config.rsc could not be read (e.g. since it does not
exist), the piDev_g.ent pointer which points to the settings extracted
from this file, is NULL. Since function revpi_set_defaults() is not
prepared for this situation it causes a NULL pointer access in this case.
Fix this by checking piDev_g.ent for NULL before calling
revpi_set_defaults().
In case that the file config.rsc could not be read (e.g. since it does not exist), the piDev_g.ent pointer which points to the settings extracted from this file, is NULL. Since function revpi_set_defaults() is not prepared for this situation it causes a NULL pointer access in this case. Fix this by checking piDev_g.ent for NULL before calling revpi_set_defaults().
Signed-off-by: Lino Sanfilippo l.sanfilippo@kunbus.com