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

Commit ca6df583 authored by Tony Truong's avatar Tony Truong
Browse files

msm: pcie: correct error check of wakeup source registration



Check for NULL when registering for wakeup source.

Change-Id: I5ccc0ac7649281b063c76cafb82be343f43f563a
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 137a997b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.*/
/* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.*/

#include <dt-bindings/regulator/qcom,rpmh-regulator-levels.h>
#include <linux/bitops.h>
@@ -5039,7 +5039,7 @@ static int32_t msm_pcie_irq_init(struct msm_pcie_dev_t *dev)
	PCIE_DBG(dev, "RC%d\n", dev->rc_idx);

	dev->ws = wakeup_source_register(pdev, dev_name(pdev));
	if (dev->ws) {
	if (!dev->ws) {
		PCIE_ERR(dev,
			"PCIe: RC%d: failed to register wakeup source\n",
			dev->rc_idx);