Skip to content

Commit

Permalink
msm: kgsl: check for NULL pointer access
Browse files Browse the repository at this point in the history
Check NULL pointer access to avoid crash

Signed-off-by: Anupam Sakargayan <asakarga@codeaurora.org>
Signed-off-by: Javier Sayago <admin@lonasdigital.com>
  • Loading branch information
Anupam Sakargayan authored and javilonas committed Jun 4, 2015
1 parent b4e2a0d commit 93a1149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/msm/adreno_profile.c
@@ -1,4 +1,4 @@
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -317,7 +317,7 @@ static bool _add_to_assignments_list(struct adreno_profile *profile,

static void check_close_profile(struct adreno_profile *profile)
{
if (profile->log_buffer == NULL)
if (profile == NULL || profile->log_buffer == NULL)
return;

if (!adreno_profile_enabled(profile) && shared_buf_empty(profile)) {
Expand Down

0 comments on commit 93a1149

Please sign in to comment.