Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2637942pxa; Mon, 17 Aug 2020 15:08:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7nxqT4TlVi5nd2vlcf3p/xh8E0ZFG7ptKhjDJQ7obNgQySRe6SUHEWrJRQGQjhOFZdO2j X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr16514338ejw.92.1597702099535; Mon, 17 Aug 2020 15:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702099; cv=none; d=google.com; s=arc-20160816; b=t7/U6wuE4E9RvsjkWmAqftq53TCaREdnbBIDIJ6vGuHvLChGVj+MgJ/Azhzv2kflvj qscg9YT3xPmGv5x3A/TQVOxq3YzpsD886e1btL0qU9p9+4EviG6fnoQPxXccjM+aLbV4 BmahA95r0Viq9GV51hnT98tDTi6J3TKFp+g4NMo+QWHFiqoYQhXpk4njToJfhjBkdasp MWQB1VTWJDyf9u8ncP5Gvxhzv9PAWeLQVwm3IGE4hVpFVIk0pSpheUVGBp7zFWK5kt9I g3+R1x2ITLbgUF56leWCNMTHsTKt9IKTNZZqUFiWZ8qhKjKuvXmA6WMLo2U9pfk2SI93 AQoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=81slugLx+i7q4Y2MWyQaFvu7+qa/53CDEReg+qpHy6U=; b=Auxe+o6cUlD1jwyOwu9j7VrpSsiZX83JJ9/AA6Hh6w106yLuCSVIOdjb3o2UkNypUW d+hvSsJMQE4ukiSLe1+HURSexGYyvbzvYLiPM+cZ3zFDyG7leXfVGPyYNtKa/G4s9NUG KI+uWj9eQ+bLCo0mV5XJUHFHYPl/4X52YOWnyl+EmhwrsnfUBiw1k/tiw0+fBxQnu03s SPSxBYPRa2GF94q69PjcqI+6CA8glAxJ4duAuEfGhienZcne5MRrWudCpT1KdhGJzKM+ UM/BIPDKUr2aZn9yeCKferQwaCXrW7XSTl/Yjjfp84D4O9heuuk7SonahXr7TANph1Pu Txkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jyxLSKSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si11621317edx.50.2020.08.17.15.07.56; Mon, 17 Aug 2020 15:08:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jyxLSKSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731197AbgHQQVe (ORCPT + 99 others); Mon, 17 Aug 2020 12:21:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:33628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387782AbgHQPt0 (ORCPT ); Mon, 17 Aug 2020 11:49:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F08020855; Mon, 17 Aug 2020 15:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679366; bh=iPCciwlE+Izoq2VcPO5gcCSP/vAeWEixAgllqOvtQMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jyxLSKSSmCNvL+ixamkFDOv76g+Yak4Yye0hhB6MuVgFeMbSO22YNd0uvfgVI9b/S UFY3waDB+WyCvtDi8lezo+Q1r0ucoPuMIKuQVwgtrzqW2lXCw0RR0mJOFczMENH2ru 3dEIoEWOzMHbB7KmsVncAeOTXx19z3PYWFSfcfwI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dariusz Marcinkiewicz , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.7 185/393] media: cros-ec-cec: do not bail on device_init_wakeup failure Date: Mon, 17 Aug 2020 17:13:55 +0200 Message-Id: <20200817143828.594817240@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dariusz Marcinkiewicz [ Upstream commit 6f01dfb760c027d5dd6199d91ee9599f2676b5c6 ] Do not fail probing when device_init_wakeup fails. device_init_wakeup fails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if: - The device has already been enabled for wakeup (by e.g. sysfs) - The driver has been unloaded and is being loaded again. This goal of the patch is to fix the above cases. Overwhelming majority of the drivers do not check device_init_wakeup return code. Fixes: cd70de2d356ee ("media: platform: Add ChromeOS EC CEC driver") Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c index 0e7e2772f08f9..2d95e16cd2489 100644 --- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c +++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c @@ -277,11 +277,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev) platform_set_drvdata(pdev, cros_ec_cec); cros_ec_cec->cros_ec = cros_ec; - ret = device_init_wakeup(&pdev->dev, 1); - if (ret) { - dev_err(&pdev->dev, "failed to initialize wakeup\n"); - return ret; - } + device_init_wakeup(&pdev->dev, 1); cros_ec_cec->adap = cec_allocate_adapter(&cros_ec_cec_ops, cros_ec_cec, DRV_NAME, -- 2.25.1