Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

Commit

Permalink
msm/camera_v2: Fix incorrect comparison usage
Browse files Browse the repository at this point in the history
/mnt/ssd/kernels/msm-4.9/drivers/media/platform/msm/camera_v2/msm.c: In function ‘msm_probe’:
/mnt/ssd/kernels/msm-4.9/drivers/media/platform/msm/camera_v2/msm.c:1378:14: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
 1378 |    0, NULL)) < 0))
      |              ^
/mnt/ssd/kernels/msm-4.9/include/asm-generic/bug.h:93:25: note: in definition of macro ‘WARN_ON’
   93 |  int __ret_warn_on = !!(condition);    \
      |                         ^~~~~~~~~

Signed-off-by: Albert I <[email protected]>
  • Loading branch information
krasCGQ authored and johnmart19 committed Feb 11, 2021
1 parent 2c97177 commit 64a0d02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/msm/camera_v2/msm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,8 @@ static int msm_probe(struct platform_device *pdev)
if (WARN_ON(rc < 0))
goto media_fail;

if (WARN_ON((rc == media_entity_pads_init(&pvdev->vdev->entity,
0, NULL)) < 0))
rc = media_entity_pads_init(&pvdev->vdev->entity, 0, NULL);
if (WARN_ON(rc < 0))
goto entity_fail;

pvdev->vdev->entity.function = QCAMERA_VNODE_GROUP_ID;
Expand Down

0 comments on commit 64a0d02

Please sign in to comment.