summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorPeter Zu <pzu@nvidia.com>2011-04-06 21:42:33 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-04-19 21:01:30 -0700
commita0bc574c527079a6895e82cc3ba96ed397db416b (patch)
treef977f3f13e72a30cfc3fc9d6630b52e390d5ae3c /drivers/video
parente3a7fc444a93dfcb045c98db77975dfcd783a63f (diff)
video: tegra: dc: hdcp: handle the case of DEVICE_COUNT = 0 properly
bug 811316 Change-Id: I4513f81719a60c8f214ee07082e58defb1cca0aa Reviewed-on: http://git-master/r/26985 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index 657f621f0c23..f3a689559dda 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -354,6 +354,9 @@ static int get_ksvfifo(struct tegra_nvhdcp *nvhdcp,
if (!ksv_list || num_bksv_list > TEGRA_NVHDCP_MAX_DEVS)
return -EINVAL;
+ if (num_bksv_list == 0)
+ return 0;
+
buf = kmalloc(buf_len, GFP_KERNEL);
if (IS_ERR_OR_NULL(buf))
return -ENOMEM;