`amodem_nvram_set()` depends on `modem->nvram_config` being set previously, but it's actually set by the return value of this function.  So `modem->nvram_config` is not yet initialized here and trap emulator with segmentation fault.

This patch was meant to share common code for saving nvram configs.  It only replaces lines in two places, inclusive of this function.  Since we shouldn't call `amodem_nvram_set()` here, leaving sharing common code a meaningless thing, I'll revert it instead.