net: lwm2m: ipso_temp_sensor: remove unnecessary variable
Remove an unnecessary local variable to store the return value, instead return directly thereby saving few bits of memory. Found using Coccinelle. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
This commit is contained in:
parent
dbcc5392fe
commit
36279b69a8
|
@ -202,8 +202,6 @@ static struct lwm2m_engine_obj_inst *temp_sensor_create(u16_t obj_inst_id)
|
|||
|
||||
static int ipso_temp_sensor_init(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
/* Set default values */
|
||||
(void)memset(inst, 0, sizeof(*inst) * MAX_INSTANCE_COUNT);
|
||||
(void)memset(res, 0, sizeof(struct lwm2m_engine_res_inst) *
|
||||
|
@ -216,7 +214,7 @@ static int ipso_temp_sensor_init(struct device *dev)
|
|||
temp_sensor.create_cb = temp_sensor_create;
|
||||
lwm2m_register_obj(&temp_sensor);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(ipso_temp_sensor_init, APPLICATION,
|
||||
|
|
Loading…
Reference in a new issue