Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bb30311 authored by Kiran Gunda's avatar Kiran Gunda
Browse files

platform: msm: msm_bus: Fix the NULL pointer dereference



Do not access the node_info pointer when it is null to
avoid the crash.

Change-Id: I8ca1a26fab847469bd205cbfb4adf63b9194a1d0
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent 863822f1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2016, 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
@@ -302,8 +302,8 @@ static int flush_bw_data(struct msm_bus_node_device_type *node_info, int ctx)
	int ret = 0;

	if (!node_info) {
		MSM_BUS_ERR("%s: Unable to find bus device for device %d",
			__func__, node_info->node_info->id);
		MSM_BUS_ERR("%s: Unable to find bus device for device",
			__func__);
		ret = -ENODEV;
		goto exit_flush_bw_data;
	}