diff options
author | Stefan Agner <stefan@agner.ch> | 2018-06-17 04:48:22 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-06-17 06:25:27 -0400 |
commit | 9fcf2b3c1c0276650fea537c71b513d27d929b05 (patch) | |
tree | 29234af5d76156e2a872279368aedee36b71ff99 | |
parent | c7d6d511eb56495f065600c90336da0f0fe1b174 (diff) |
drm/atmel-hlcdc: check stride values in the first plane
The statement always evaluates to true since the struct fields
are arrays. This has shown up as a warning when compiling with
clang:
warning: address of array 'desc->layout.xstride' will always
evaluate to 'true' [-Wpointer-bool-conversion]
Check for values in the first plane instead.
Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180617084826.31885-1-stefan@agner.ch
-rw-r--r-- | drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index e18800ed7cd1..7b8191eae68a 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | |||
@@ -875,7 +875,7 @@ static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane, | |||
875 | drm_object_attach_property(&plane->base.base, | 875 | drm_object_attach_property(&plane->base.base, |
876 | props->alpha, 255); | 876 | props->alpha, 255); |
877 | 877 | ||
878 | if (desc->layout.xstride && desc->layout.pstride) { | 878 | if (desc->layout.xstride[0] && desc->layout.pstride[0]) { |
879 | int ret; | 879 | int ret; |
880 | 880 | ||
881 | ret = drm_plane_create_rotation_property(&plane->base, | 881 | ret = drm_plane_create_rotation_property(&plane->base, |