When the callback parameter is null, it causes abnormal operation.
To avoid this, callback parameter check is necessary.
Change-Id: I5bfdf967ed5abea9563cbe070d8157b47d5ec7b0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
if (!IS_STATE_BIT(state_bits))
return DEVICE_ERROR_INVALID_PARAMETER;
+ if (!cb)
+ return DEVICE_ERROR_INVALID_PARAMETER;
+
return register_state_signal_callback(state_bits, cb, data);
}
if (!IS_TRANSIENT_STATE_BIT(transient_bits))
return DEVICE_ERROR_INVALID_PARAMETER;
+ if (!cb)
+ return DEVICE_ERROR_INVALID_PARAMETER;
+
return register_transient_state_signal_callback(transient_bits, cb, data);
}