diff options
| author | Deva Ramasubramanian <dramasub@codeaurora.org> | 2014-01-24 12:38:37 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-02-10 11:28:19 -0800 |
| commit | e28d05092ee29d31c27e273bc9ccbc2bc3c49e1c (patch) | |
| tree | 8f5792f37c75b2ee6634c2d1335dc675b1f1ce21 | |
| parent | 219364c550a437c70e7726505d1c5a1291aa98c8 (diff) | |
[media] media: Init the reserved fields of struct media_link_desc
struct media_link_desc is copy_to_user'ed as the return value of
MEDIA_IOC_ENUM_LINKS. When copying, the driver is omitting to initialise
the reserved fields. This commit fixes that by initialising the
reserved fields to 0.
CRs-Fixed: 570757
Change-Id: I230e2666c0845cc36399518a0f2c94db664382d1
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
| -rw-r--r-- | drivers/media/media-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 1957c0df08f..aa010435966 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -141,7 +141,7 @@ static long __media_device_enum_links(struct media_device *mdev, unsigned int p; for (p = 0; p < entity->num_pads; p++) { - struct media_pad_desc pad; + struct media_pad_desc pad = {0}; media_device_kpad_to_upad(&entity->pads[p], &pad); if (copy_to_user(&links->pads[p], &pad, sizeof(pad))) return -EFAULT; |
