[PATCH 4.19 086/134] serial: max310x: Fix to avoid potential NULL pointer dereference