Change-Id: Iecfcc15a5ee2e34b114fc61f60496a3f689abfe6
Signed-off-by: pr.jung <pr.jung@samsung.com>
int i;
bool ir_avail;
+ if (!pattern)
+ return DEVICE_ERROR_INVALID_PARAMETER;
+ if (size <= 0) {
+ _E("IR pattern size is invalid");
+ return DEVICE_ERROR_INVALID_PARAMETER;
+ }
+
ret = device_ir_is_available(&ir_avail);
if (!ir_avail) {
if (ret < 0) {
return DEVICE_ERROR_OPERATION_FAILED;
}
- if (!pattern)
- return DEVICE_ERROR_INVALID_PARAMETER;
- if (size <= 0) {
- _E("IR pattern size is invalid");
- return DEVICE_ERROR_INVALID_PARAMETER;
- }
-
freq_pattern[0] = carrier_frequency;
for (i = 1; i <= size; i++)
freq_pattern[i] = pattern[i-1];