Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp226726lqk; Thu, 14 Mar 2024 00:56:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYT6zoJzCmHEHkjyaglLaQNzcQ+NmA1aPhiSV1dvN/VE+w26RuXFwM3hjO7wsbNuBRKY2r590zVWwgr5LzRnoP0PuTZAC11OiqeHxhAA== X-Google-Smtp-Source: AGHT+IFC2YG5uVXKdpXwml0vkOPxAwvt5S6kYaQD3Lp5LqBfkvFUMWnwO31X8flqB2rUwUMtLwBm X-Received: by 2002:a05:620a:164b:b0:788:573c:9ecf with SMTP id c11-20020a05620a164b00b00788573c9ecfmr947979qko.43.1710402971158; Thu, 14 Mar 2024 00:56:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710402971; cv=pass; d=google.com; s=arc-20160816; b=BM0Jj1vNwKLJV3jhpjtcufdFuAHRaNGZGXxuxAWIsQTFlb+JAsgZsgmQxGidI+lP7h 3SEse2flUD59/RicCaF3Fkf20cdTvIcgakKZUoSWaBvBC26y4dmKc7x9aYH3QtwCPZAy fwu8Mh06cVJ6yGyWJpIzP+WtazfJ6/nH/QZhZMtqaGEqLtspBYRvg86xDRPWjWDLipyK kbJGtEprW2i2ZEZulHucYnl8WsqlQJSQb3cBE1XKx83lVimvAXKrOBO7NJsYiXr651Ff f/vMKxNg0TyMbgnLSDIROpyfJjfP+eNPQZ8NK6SK2nivxSzGREbRlDkAP5NzNaW8W8bD R/0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=2zejXuullfxzo5V55VCYT5B8ajO6/eBhyQJAMGV39No=; fh=eaqcUq8QyZYTX10267duC0CYQQpIbr9U3OT78cCyT7c=; b=BgdG8F4GNPcTkzaiAEjbo6iAEG9JjD9B7dvDjhYLzZQseZ96bm9L1TCW2FsL60rJTZ aWZuWA1Xs1/N8f/sxkgGy/0wyPV22dY5SbO/v028PK8z2Dfe/UcLN1Mef3xH2O/6xT0/ zi5pYAppdxNyVvHIrqW+sfdgjRpQwg2G8hbrq7fytVF+c0cpaOC5WYXIARDsAcY+33Dq aO4pRVdx+D+TsstQraqCnScAklvLM9/W6KVdmtqs+hxTGv3VqaoVt4hR8q5Kgu2COtcz ILWEQt6LK7wAEugeA+D4a3eD/R4TfGRJc5CeL+LQaMj+Wu5KYuM6LzhS+uNwdBWXebxc jbcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PSs45KsS; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-102954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102954-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h20-20020a05620a10b400b007891e4be0dasi986642qkk.20.2024.03.14.00.56.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 00:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PSs45KsS; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-102954-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102954-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 908321C227FA for ; Thu, 14 Mar 2024 07:56:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F7095D480; Thu, 14 Mar 2024 07:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="PSs45KsS" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDEF95CDD0; Thu, 14 Mar 2024 07:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710402961; cv=none; b=CTTlMGuDICfyFoSMfqDesOs4FIwA6A7ES9V1ZrQWZKY+ew89mCOu+uwnFdzlk81UlTPNwfAhhk+rVmnb4yQhupctBIhFEF0e91HK0lNZHmaCnwFBzQLNsutUA1kKsrhZr7y6Oq2DPpTuQ6JU3IAtWTpFvF9eaYU4rPASYSvn/yw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710402961; c=relaxed/simple; bh=+gCNw/gViVCA4efaztjNveTgU74u33JPDfPh4UoRLWY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=iZinvHcxgk1ueNmepBNc0AdHdzT3GSyBccyLikggYgz5Mt17sNJ/HlrQfR7IT/zTiM4Iqlc8zoEt57rdqmfq7YjLRtKqZp5iP90svscl//LRBYugStK3E4JUCwIuQw9uU4zYB5dujUzNknMJxNNCq8ig6H6E6pfAqax9ulJqVJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=PSs45KsS; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42E7tnpA073082; Thu, 14 Mar 2024 02:55:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710402949; bh=2zejXuullfxzo5V55VCYT5B8ajO6/eBhyQJAMGV39No=; h=From:To:CC:Subject:Date; b=PSs45KsSNTb4r/V0Y/otu/98Dn4rxaZLbcw49OAZX0Dz9HVXk3ex6akI6+UG3uFbz z6ErwpdG0WVdZq8iReDgKRKHDzt3AMCFV87L2GzGIBQU60D2iyMwa2821SH7MCmSm0 nvPbIQ0GsmKQ3E1RKTIZ/vljh+ui5slPf15UNZ1g= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42E7tnEM114984 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Mar 2024 02:55:49 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 14 Mar 2024 02:55:49 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 14 Mar 2024 02:55:49 -0500 Received: from dhruva.dhcp.ti.com (dhruva.dhcp.ti.com [172.24.227.68]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42E7tj9B029562; Thu, 14 Mar 2024 02:55:46 -0500 From: Dhruva Gole To: "Rafael J. Wysocki" CC: Tony Lindgren , , Sibi Sankar , Viresh Kumar , , , Dhruva Gole , Ulf Hansson Subject: [PATCH] PM: wakeup: Add a missing return case in init_wakeup Date: Thu, 14 Mar 2024 13:24:30 +0530 Message-ID: <20240314075429.1164810-1-d-gole@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 The device_wakeup_disable call can return an error if no dev exists however this was being ignored. Catch this return value and propagate it onward in device_init_wakeup. Signed-off-by: Dhruva Gole --- include/linux/pm_wakeup.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h index 6eb9adaef52b..64c7db35e693 100644 --- a/include/linux/pm_wakeup.h +++ b/include/linux/pm_wakeup.h @@ -232,14 +232,15 @@ static inline void pm_wakeup_hard_event(struct device *dev) */ static inline int device_init_wakeup(struct device *dev, bool enable) { + int ret; if (enable) { device_set_wakeup_capable(dev, true); - return device_wakeup_enable(dev); + ret = device_wakeup_enable(dev); } else { - device_wakeup_disable(dev); + ret = device_wakeup_disable(dev); device_set_wakeup_capable(dev, false); - return 0; } + return ret; } #endif /* _LINUX_PM_WAKEUP_H */ base-commit: 9bb9b28d0568991b1d63e66fe75afa5f97ad1156 -- 2.34.1