media: dvb_frontend: fix wrong cast in compat_ioctl
authorKatsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Fri, 5 Jun 2020 16:25:17 +0000 (09:25 -0700)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:35 +0000 (15:38 -0400)
commit39f03fefa8d3c16e5068cc11a77be0dfe4f0eb19
tree77e72385acbb00a3097a8fa6ba425a4b4993d027
parent20bcc237b3cd59a0ac24f03b1159b13264919cf6
media: dvb_frontend: fix wrong cast in compat_ioctl

commit 5c6c9c4830b76d851d38829611b3c3e4be0f5cdf upstream

FE_GET_PROPERTY has always failed as following situations:
  - Use compatible ioctl
  - The array of 'struct dtv_property' has 2 or more items

This patch fixes wrong cast to a pointer 'struct dtv_property' from a
pointer of 2nd or after item of 'struct compat_dtv_property' array.

Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-core/dvb_frontend.c