Merge tag 'mac80211-for-davem-2016-07-06' of git://git.kernel.org/pub/scm/linux/kerne...
[cascardo/linux.git] / drivers / media / i2c / adp1653.c
index 9e1731c..e191e29 100644 (file)
@@ -95,7 +95,7 @@ static int adp1653_get_fault(struct adp1653_flash *flash)
        int rval;
 
        fault = i2c_smbus_read_byte_data(client, ADP1653_REG_FAULT);
-       if (IS_ERR_VALUE(fault))
+       if (fault < 0)
                return fault;
 
        flash->fault |= fault;
@@ -105,13 +105,13 @@ static int adp1653_get_fault(struct adp1653_flash *flash)
 
        /* Clear faults. */
        rval = i2c_smbus_write_byte_data(client, ADP1653_REG_OUT_SEL, 0);
-       if (IS_ERR_VALUE(rval))
+       if (rval < 0)
                return rval;
 
        flash->led_mode->val = V4L2_FLASH_LED_MODE_NONE;
 
        rval = adp1653_update_hw(flash);
-       if (IS_ERR_VALUE(rval))
+       if (rval)
                return rval;
 
        return flash->fault;
@@ -158,7 +158,7 @@ static int adp1653_get_ctrl(struct v4l2_ctrl *ctrl)
        int rval;
 
        rval = adp1653_get_fault(flash);
-       if (IS_ERR_VALUE(rval))
+       if (rval)
                return rval;
 
        ctrl->cur.val = 0;
@@ -184,7 +184,7 @@ static int adp1653_set_ctrl(struct v4l2_ctrl *ctrl)
        int rval;
 
        rval = adp1653_get_fault(flash);
-       if (IS_ERR_VALUE(rval))
+       if (rval)
                return rval;
        if ((rval & (ADP1653_REG_FAULT_FLT_SCP |
                     ADP1653_REG_FAULT_FLT_OT |