atomisp: silence false-positive critical KW issue
authorDavid Cohen <david.a.cohen@intel.com>
Wed, 28 Mar 2012 13:50:15 +0000 (16:50 +0300)
committerbuildbot <buildbot@intel.com>
Fri, 30 Mar 2012 11:56:40 +0000 (04:56 -0700)
BZ: 24562

KW cannot detect very well kernel code flow. For 3rd time we receive
same false-positive critical KW issue. This patch will trick KW.

Change-Id: Ibdf97d69284d70a62253f510c4e8af5b6212f446
Signed-off-by: David Cohen <david.a.cohen@intel.com>
Reviewed-on: http://android.intel.com:8080/41327
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/atomisp/atomisp_cmd.c

index 65be722..932904e 100644 (file)
@@ -3676,10 +3676,11 @@ __acc_fw_alloc(struct atomisp_device *isp, struct atomisp_acc_fw_load *user_fw)
        }
 
        /* Find first free slot */
-       for (i = 0; i < ATOMISP_ACC_FW_MAX; i++) {
+       for (i = 0; i < ATOMISP_ACC_FW_MAX - 1; i++) {
                if (isp->acc_fw[i] == NULL)
                        break;
        }
+       WARN(isp->acc_fw[i] != NULL, "%s: excess of accel fw.\n", __func__);
        user_fw->fw_handle = isp->acc_fw_handle;
        fw->header.handle = isp->acc_fw_handle;
        isp->acc_fw[i] = fw;