net: lwm2m: Prevent infinite loop in do_write_op_tlv function
net: lwm2m: Prevent infinite loop in do_write_op_tlv function

In case unsopported TLV type or malformed packet is received, the
`do_write_op_tlv` function will end up in an infinite loop. Prevent that
by returning an error code in case it does not recognize TLV type.

Signed-off-by: Robert Lubos <9d28997c6894a2d0321a7bb399169af7ce99b64e@nordicsemi.no>

nashif/zephyr,galak/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,nashif/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr