[media] fmdrv: Don't check if unsigned are below zero
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 19:43:41 +0000 (16:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 28 Oct 2012 09:39:04 +0000 (07:39 -0200)
drivers/media/radio/wl128x/fmdrv_common.c:745:3: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/media/radio/wl128x/fmdrv_rx.c:308:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/wl128x/fmdrv_common.c
drivers/media/radio/wl128x/fmdrv_rx.c

index bf867a6b5ea0b5c745bf6684a75183e25b354843..602ef7ac8c243a62249acb0e9ead0ff7f6768f13 100644 (file)
@@ -742,7 +742,7 @@ static void fm_irq_handle_rdsdata_getcmd_resp(struct fmdev *fmdev)
                if ((meta_data & FM_RDS_STATUS_ERR_MASK) != 0)
                        break;
 
-               if (blk_idx < FM_RDS_BLK_IDX_A || blk_idx > FM_RDS_BLK_IDX_D) {
+               if (blk_idx > FM_RDS_BLK_IDX_D) {
                        fmdbg("Block sequence mismatch\n");
                        rds->last_blk_idx = -1;
                        break;
index 3dd9fc097c473f5974034fdce141079e242e915e..ebf09a3927deea0f34070d54aa6e3c65b7bd1742 100644 (file)
@@ -305,7 +305,7 @@ int fm_rx_set_volume(struct fmdev *fmdev, u16 vol_to_set)
        if (fmdev->curr_fmmode != FM_MODE_RX)
                return -EPERM;
 
-       if (vol_to_set < FM_RX_VOLUME_MIN || vol_to_set > FM_RX_VOLUME_MAX) {
+       if (vol_to_set > FM_RX_VOLUME_MAX) {
                fmerr("Volume is not within(%d-%d) range\n",
                           FM_RX_VOLUME_MIN, FM_RX_VOLUME_MAX);
                return -EINVAL;