mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
Merge "msm: kgsl: Fix invalid pointer reference at a few places"
This commit is contained in:
commit
9d5184d672
3 changed files with 6 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2002,2007-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/interconnect.h>
|
||||
|
|
@ -837,7 +837,7 @@ static int set_user_profiling(struct adreno_device *adreno_dev,
|
|||
u64 ib_gpuaddr;
|
||||
u32 *ib;
|
||||
|
||||
if (!rb->profile_desc->hostptr)
|
||||
if (IS_ERR(rb->profile_desc))
|
||||
return 0;
|
||||
|
||||
ib = ((u32 *) rb->profile_desc->hostptr) +
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "adreno.h"
|
||||
|
|
@ -746,7 +746,7 @@ size_t adreno_snapshot_global(struct kgsl_device *device, u8 *buf,
|
|||
|
||||
u8 *ptr = buf + sizeof(*header);
|
||||
|
||||
if (!memdesc || memdesc->size == 0)
|
||||
if (IS_ERR_OR_NULL(memdesc) || memdesc->size == 0)
|
||||
return 0;
|
||||
|
||||
if (remain < (memdesc->size + sizeof(*header))) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2008-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2008-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#ifndef __KGSL_H
|
||||
#define __KGSL_H
|
||||
|
|
@ -479,7 +479,7 @@ void kgsl_core_exit(void);
|
|||
static inline bool kgsl_gpuaddr_in_memdesc(const struct kgsl_memdesc *memdesc,
|
||||
uint64_t gpuaddr, uint64_t size)
|
||||
{
|
||||
if (!memdesc)
|
||||
if (IS_ERR_OR_NULL(memdesc))
|
||||
return false;
|
||||
|
||||
/* set a minimum size to search for */
|
||||
|
|
|
|||
Loading…
Reference in a new issue