set_fs(KERNEL_DS);
filp = filp_open(path, O_RDWR|O_CREAT, 0666);
- if (IS_ERR(filp)) {
- pr_info("create %s error.\n", path);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("create %s error or filp is NULL.\n", path);
return;
}
if ((devp->cma_config_flag & 0x1) &&
mem_size = (loff_t)devp->canvas_active_w * devp->canvas_h;
for (i = 0; i < VDIN_CANVAS_MAX_CNT; i++)
vfbuf[i] = NULL;
- if (IS_ERR(filp)) {
- pr_info("create %s error.\n", path);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("create %s error or filp is NULL.\n", path);
return;
}
if ((devp->cma_config_flag & 0x1) &&
}
strcat(buff, "_1header.bin");
filp = filp_open(buff, O_RDWR|O_CREAT, 0666);
- if (IS_ERR(filp)) {
- pr_info("create %s header error.\n", buff);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("create %s header error or filp is NULL.\n", buff);
return;
}
strcpy(buff, path);
strcat(buff, "_1table.bin");
filp = filp_open(buff, O_RDWR|O_CREAT, 0666);
- if (IS_ERR(filp)) {
- pr_info("create %s table error.\n", buff);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("create %s table error or filp is NULL.\n", buff);
return;
}
vdin_dma_flush(devp, buf_table,
strcpy(buff, path);
strcat(buff, "_1body.bin");
filp = filp_open(buff, O_RDWR|O_CREAT, 0666);
- if (IS_ERR(filp)) {
- pr_info("create %s body error.\n", buff);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("create %s body error or filp is NULL.\n", buff);
return;
}
if (highmem_flag == 0) {
set_fs(KERNEL_DS);
filp = filp_open(path, O_RDWR|O_CREAT, 0666);
- if (IS_ERR(filp)) {
- pr_info("create %s error.\n", path);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("create %s error or filp is NULL.\n", path);
return;
}
buf = phys_to_virt(start);
set_fs(KERNEL_DS);
pr_info("head bin file path = %s\n", md_path_head);
filp = filp_open(md_path_head, O_RDONLY, 0);
- if (IS_ERR(filp)) {
- pr_info("read %s error.\n", md_path_head);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("read %s error or filp is NULL.\n", md_path_head);
return;
}
set_fs(KERNEL_DS);
pr_info("body bin file path = %s\n", md_path_body);
filp = filp_open(md_path_body, O_RDONLY, 0);
- if (IS_ERR(filp)) {
- pr_info("read %s error.\n", md_path_body);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("read %s error or filp is NULL.\n", md_path_body);
return;
}
set_fs(KERNEL_DS);
pr_info("bin file path = %s\n", path);
filp = filp_open(path, O_RDONLY, 0);
- if (IS_ERR(filp)) {
- pr_info("read %s error.\n", path);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("read %s error or filp is NULL.\n", path);
return;
}
devp->curr_wr_vfe->vf.type = VIDTYPE_VIU_SINGLE_PLANE |
set_fs(KERNEL_DS);
pr_info("md file path = %s\n", md_path);
md_flip = filp_open(md_path, O_RDONLY, 0);
- if (IS_ERR(md_flip)) {
- pr_info("read %s error.\n", md_path);
+ if (IS_ERR_OR_NULL(md_flip)) {
+ pr_info("read %s error or md_flip = NULL.\n", md_path);
return;
}
index = devp->curr_wr_vfe->vf.index & 0xff;
set_fs(KERNEL_DS);
pr_info("bin file path = %s\n", path);
filp = filp_open(path, O_RDONLY, 0);
- if (IS_ERR(filp)) {
- pr_info("read %s error.\n", path);
+ if (IS_ERR_OR_NULL(filp)) {
+ pr_info("read %s error or filp is NULL.\n", path);
return;
}
for (i = 0; i < field_num; i++) {
enum tvin_sig_fmt_e fmt;
mutex_lock(&devp->fe_lock);
- if (IS_ERR(devp)) {
- pr_err("[vdin]%s vdin%d has't registered,please register.\n",
- __func__, no);
+ if (IS_ERR_OR_NULL(devp)) {
+ pr_err("[vdin]%s vdin%d has't registered or devp is NULL\n",
+ __func__, no);
mutex_unlock(&devp->fe_lock);
return -1;
}
{
struct vdin_dev_s *devp = vdin_devp[no];
int ret = 0;
- if (IS_ERR(devp)) {
- pr_err("[vdin]%s vdin%d has't registered,please register.\n",
- __func__, no);
+ if (IS_ERR_OR_NULL(devp)) {
+ pr_err("[vdin]%s vdin%d has't registered or devp is NULL\n",
+ __func__, no);
return -1;
}
if (devp->frontend &&
pr_info("TVIN_IOC_GET_ALLM_MODE err\n\n");
break;
}
- pr_info("allm mode-%d,IT=%d,CN=%d\n\n",
- devp->prop.latency.allm_mode,
- devp->prop.latency.it_content,
- devp->prop.latency.cn_type);
+
+ if (vdin_dbg_en)
+ pr_info("allm mode-%d,IT=%d,CN=%d\n\n",
+ devp->prop.latency.allm_mode,
+ devp->prop.latency.it_content,
+ devp->prop.latency.cn_type);
mutex_unlock(&devp->fe_lock);
break;
case TVIN_IOC_G_VDIN_HIST:
goto fail_add_cdev;
}
vdevp->dev = vdin_create_device(&pdev->dev, vdevp->index);
- if (IS_ERR(vdevp->dev)) {
- pr_err("%s: failed to create device. !!!!!!!!!!\n", __func__);
+ if (IS_ERR_OR_NULL(vdevp->dev)) {
+ pr_err("%s: failed to create device. or dev=NULL\n", __func__);
ret = PTR_ERR(vdevp->dev);
goto fail_create_device;
}
pr_info("%s: major %d\n", __func__, MAJOR(vdin_devno));
vdin_clsp = class_create(THIS_MODULE, VDIN_CLS_NAME);
- if (IS_ERR(vdin_clsp)) {
+ if (IS_ERR_OR_NULL(vdin_clsp)) {
ret = PTR_ERR(vdin_clsp);
- pr_err("%s: failed to create class\n", __func__);
+ pr_err("%s: failed to create class or ret=NULL\n", __func__);
goto fail_class_create;
}
#ifdef DEBUG_SUPPORT