nvmap: add null pointer check in __nvmap_sg_table
authorIshwarya Balaji Gururajan <igururajan@nvidia.com>
Wed, 2 Jul 2014 01:04:32 +0000 (18:04 -0700)
committerEmad Mir <emir@nvidia.com>
Thu, 3 Jul 2014 17:41:47 +0000 (10:41 -0700)
commit18b5248fb736012b9553e5d68bb6327b164e54e7
tree6c4a38b8768199fd9c9a750c507dbe013aa50b37
parentc7ed2def2b13fb3af95ed778e353dc902f5ab47e
nvmap: add null pointer check in __nvmap_sg_table

Possible null pointer derefernce occurs when
nvmap_pages return NULL. Add null pointer check after
nvmap_pages call to prevent null pointer dereference in
sg_alloc_table_from_pages

bug 1516222

Change-Id: I7aa06f8b3e8c0846c496f62ad49f753d21bc9102
Signed-off-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
Reviewed-on: http://git-master/r/433389
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Tested-by: Sri Krishna Chowdary <schowdary@nvidia.com>
drivers/video/tegra/nvmap/nvmap.c