linux/drivers/media/dvb-frontends/drx39xyj
Mauro Carvalho Chehab b6554ea551 [media] drxj: don't do math if not needed
While there's no risk of divison by zero, the logic there is akward, as it
does the calculus for the numerator and denominator before checking
if this will be used.

Change the order to check first if the denominator is zero, and only
calculating the numerator/denominator if not.

This should also avoid those smatch errors:
	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero
	drivers/media/dvb-frontends/drx39xyj/drxj.c:9605 ctrl_get_qam_sig_quality() debug: sval_binop_unsigned: divide by zero

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-01 10:55:55 -03:00
..
bsp_i2c.h [media] drx-j: Use the Linux error codes 2014-03-04 14:29:41 -03:00
drx39xxj.h dvb-frontends: use IS_REACHABLE() instead of IS_ENABLED() 2015-04-08 15:05:12 -03:00
drx_dap_fasi.h [media] drx-j: make checkpatch.pl happy 2014-03-04 14:30:44 -03:00
drx_driver_version.h [media] drx-j: make checkpatch.pl happy 2014-03-04 14:30:44 -03:00
drx_driver.h [media] drx-j: Prepare to use DVBv5 stats 2014-03-11 07:37:19 -03:00
drxj_map.h [media] drx-j: make checkpatch.pl happy 2014-03-04 14:30:44 -03:00
drxj.c [media] drxj: don't do math if not needed 2016-03-01 10:55:55 -03:00
drxj.h [media] drx-j: remove external symbols 2014-03-11 07:37:16 -03:00
Kconfig [media] drx-j: use customise option correctly 2014-04-07 09:39:51 -03:00
Makefile [media] drx-j: get rid of drx_dap_fasi.c 2014-03-04 14:39:06 -03:00