Skip to content

Commit

Permalink
cvbs: clean up bad shift, deadcode, mixed enums errors
Browse files Browse the repository at this point in the history
PD#150075: driver defect clean up:
 vdac_dev.c:
#5
torvalds#6
torvalds#876
 tv_vout.c:
torvalds#181
torvalds#267
torvalds#311
torvalds#312
torvalds#313
torvalds#314
torvalds#315
torvalds#532
torvalds#605

Change-Id: I185072efb68df1abdad036a21867bb64efca914c
Signed-off-by: Nian Jing <[email protected]>
  • Loading branch information
Nian Jing authored and akiernan committed Nov 4, 2022
1 parent 47b35c4 commit b94e5e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 10 additions & 3 deletions drivers/amlogic/media/vout/cvbs/cvbs_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ static void cvbs_debug_store(char *buf)
}

func_type_map(argv[1]);
if (func_read == NULL)
goto DEBUG_END;
ret = kstrtoul(argv[2], 16, &addr);

print_info("read %s[0x%x] = 0x%x\n",
Expand All @@ -859,6 +861,8 @@ static void cvbs_debug_store(char *buf)
}

func_type_map(argv[1]);
if (func_read == NULL)
goto DEBUG_END;
ret = kstrtoul(argv[2], 16, &addr);
ret = kstrtoul(argv[3], 10, &start);
ret = kstrtoul(argv[4], 10, &length);
Expand All @@ -885,7 +889,8 @@ static void cvbs_debug_store(char *buf)
}

func_type_map(argv[1]);

if (func_read == NULL)
goto DEBUG_END;
ret = kstrtoul(argv[2], 16, &start);
ret = kstrtoul(argv[3], 16, &end);

Expand All @@ -903,7 +908,8 @@ static void cvbs_debug_store(char *buf)
}

func_type_map(argv[2]);

if (func_write == NULL)
goto DEBUG_END;
ret = kstrtoul(argv[1], 16, &value);
ret = kstrtoul(argv[3], 16, &addr);

Expand All @@ -921,7 +927,8 @@ static void cvbs_debug_store(char *buf)
}

func_type_map(argv[2]);

if (func_read == NULL)
goto DEBUG_END;
ret = kstrtoul(argv[1], 16, &value);
ret = kstrtoul(argv[3], 16, &addr);
ret = kstrtoul(argv[4], 10, &start);
Expand Down
2 changes: 0 additions & 2 deletions drivers/amlogic/media/vout/vdac/vdac_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ static int aml_vdac_probe(struct platform_device *pdev)
cdev_del(&devp->cdev);
fail_add_cdev:
pr_err("%s: add device error\n", __func__);
kfree(devp);
fail_create_class:
pr_err("%s: class create error\n", __func__);
class_destroy(devp->clsp);
Expand All @@ -603,7 +602,6 @@ static int __exit aml_vdac_remove(struct platform_device *pdev)
cdev_del(&devp->cdev);
class_destroy(devp->clsp);
unregister_chrdev_region(devp->devno, 1);
kfree(devp);
pr_info("%s: amvdac_exit.\n", __func__);

return 0;
Expand Down

0 comments on commit b94e5e2

Please sign in to comment.