summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2018-09-21 06:00:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-24 08:20:12 +0100
commit14dc7aeef3f4ada5adeab3a3836e4e28f9452c66 (patch)
tree4d06b86a67c3aab30d0dba67224991e35e18948c /drivers/media/platform
parent7672ca60a14a82fcbfbede78559a0be250c686cc (diff)
downloadlinux-stable-14dc7aeef3f4ada5adeab3a3836e4e28f9452c66.tar.gz
linux-stable-14dc7aeef3f4ada5adeab3a3836e4e28f9452c66.tar.bz2
linux-stable-14dc7aeef3f4ada5adeab3a3836e4e28f9452c66.zip
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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/pxa_camera.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index b6e9e93bde7a..406ac673ad84 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2397,7 +2397,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
pcdev->res = res;
pcdev->pdata = pdev->dev.platform_data;
- if (&pdev->dev.of_node && !pcdev->pdata) {
+ if (pdev->dev.of_node && !pcdev->pdata) {
err = pxa_camera_pdata_from_dt(&pdev->dev, pcdev, &pcdev->asd);
} else {
pcdev->platform_flags = pcdev->pdata->flags;