media: pxa_camera: Fix check for pdev->dev.of_node
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 21 Sep 2018 10:00:45 +0000 (06:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:23:06 +0000 (08:23 +0100)
commit71e8281e081236a715afefdb92b3ea510d9c3d52
tree5a3614ced7445ffc356b3373a698ee506cf68d1c
parent86f049f29a2d8d7daa573c51a93d73d7c0f5f4aa
media: pxa_camera: Fix check for pdev->dev.of_node

[ Upstream commit 44d7f1a77d8c84f8e42789b5475b74ae0e6d4758 ]

Clang warns that the address of a pointer will always evaluated as true
in a boolean context.

drivers/media/platform/pxa_camera.c:2400:17: warning: address of
'pdev->dev.of_node' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (&pdev->dev.of_node && !pcdev->pdata) {
             ~~~~~~~~~~^~~~~~~ ~~
1 warning generated.

Judging from the rest of the kernel, it seems like this was an error and
just the value of of_node should be checked rather than the address.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/pxa_camera.c