]> git.baikalelectronics.ru Git - kernel.git/commit
[media] radio-si476x: add return value check to avoid dead code
authorFugang Duan <b38611@freescale.com>
Mon, 11 Jan 2016 07:13:35 +0000 (05:13 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 1 Feb 2016 10:01:15 +0000 (08:01 -0200)
commit62732227a0bd3f4ac39b124d5ac239c6c63c84a7
treec3fb04974832c94ed4bd1b404db144e284951d77
parente49847d986c934a2b4ab95480eaa60e33179b239
[media] radio-si476x: add return value check to avoid dead code

Dead code found on below code:
    si476x_radio_add_new_custom(radio, SI476X_IDX_DIVERSITY_MODE);
    if (rval < 0)
            goto exit;

    si476x_radio_add_new_custom(radio, SI476X_IDX_INTERCHIP_LINK);
    if (rval < 0)  ====> Dead code !!!
            goto exit;

The piece of code miss return value check after calling .si476x_radio_add_new_custom(),
the patch fix it.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/radio/radio-si476x.c