Skip to content

Commit

Permalink
mm/mmap_lock: Remove unnecessary 'NULL' values from Pointer
Browse files Browse the repository at this point in the history
Pointer variables allocate memory first, and then judge. There is no
need to initialize the assignment.

Signed-off-by: XU pengfei <xupengfei@nfschina.com>
  • Loading branch information
xupf1 authored and intel-lab-lkp committed Oct 8, 2022
1 parent 183de54 commit d8ed9ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/mmap_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void trace_mmap_lock_unreg(void)
*/
static const char *get_mm_memcg_path(struct mm_struct *mm)
{
char *buf = NULL;
char *buf;
struct mem_cgroup *memcg = get_mem_cgroup_from_mm(mm);

if (memcg == NULL)
Expand Down

0 comments on commit d8ed9ca

Please sign in to comment.