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

Commit 67474db3 authored by Kiran Gunda's avatar Kiran Gunda
Browse files

thermal: qpnp-temp-alarm: Fix compilation error



Checks against NULL for "pdev", "pdev->dev" and "of_node" are not
necessary as these are not expected to be NULL in the probe. Hence
remove these checks. This addresses the compilation issue as well.

Change-Id: Ifd9d8910dc81edaee1f3998e5d9f9e463aab65d5
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent 3364ad12
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2019, 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
@@ -403,12 +403,6 @@ static int qpnp_tm_probe(struct platform_device *pdev)
	int rc = 0;
	u8 raw_type[2], type, subtype;

	if (!pdev || !(&pdev->dev) || !pdev->dev.of_node) {
		dev_err(&pdev->dev, "%s: device tree node not found\n",
			__func__);
		return -EINVAL;
	}

	node = pdev->dev.of_node;

	chip = kzalloc(sizeof(struct qpnp_tm_chip), GFP_KERNEL);