Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2630741pxa; Mon, 17 Aug 2020 14:56:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQsk1uT9lyG3J/p+4BZf4PqiWpBXVRen9c7vHHy1zd981mcHC6wKs9yV6+bYoXatFUkibY X-Received: by 2002:a50:ee92:: with SMTP id f18mr17007354edr.80.1597701377114; Mon, 17 Aug 2020 14:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597701377; cv=none; d=google.com; s=arc-20160816; b=r7Ewy1L6E3aGxZhECyXsdbXZGRAl1cV9Zn/zXc0o+JcjTJL73l8Nj3MAwxQa4xlQqE 5aiZfnzmEfvUx4A4ahHeMqfwgsZShYXTQuq3+El196PIpLcnWuT8quZ2A0pPcjNbE9z1 qdG1LDhkE8G58XFAJ9XU8FJW/D/P4FR/k9R6lQurNn4cTw2F8ambpxi/QDLglr134pNP J3XZTM+8k0xDPaEjv7Dt+LhPiYjGgn227NcMIz7fll3jPHB2hDAZkMRW7ORFEBhd3jf9 +3oIn3cZPAuFa2pZI1eCAQgryIeh/K/piSnXt04LbyZcmPX9F5RjM9UhB+fquqGbXjyJ teXQ== 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=e6BRosG8e+oel4SX8sb7NcRETEYWG35R+DeHTgL1Znk=; b=hGD9oKBdykMDosuj1ZhdbZz4T8UHuNDoWBJkFe7OVVfIl/Uqv99uLNg0Rh7yfCFkUZ BZc8TuZnECbbfc5IixIvle9Ef/NcwngPqiSCZ4cVpEMSmoIY2rQAdQfC4e6jMecMAlrH cyWeWYZM9mCMRuLrGhUbJiZoqMEnotEHJmAKddWzoohJXyTqOcjqzIQXQsbyllUIZ8PS PZ0uXIG4IOv9sFDbAA7fFr3tHyUTvqflk2To4BKKT/u0MAQGnluaqIiWT4tSf9WEz2jJ wpbtCR0N7w2CtO//XtH8iG9mNT1TjNA0+yjz0wGAYQmW2rMDa3EgfIOyImH8Unij1ZOg sMaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pZMh1mq6; 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 i26si11675389edv.600.2020.08.17.14.55.53; Mon, 17 Aug 2020 14:56:17 -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=pZMh1mq6; 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 S1730145AbgHQP3x (ORCPT + 99 others); Mon, 17 Aug 2020 11:29:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:40982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729979AbgHQP15 (ORCPT ); Mon, 17 Aug 2020 11:27:57 -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 EE40923B54; Mon, 17 Aug 2020 15:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678076; bh=k2Y/wdQBPBwdqVEJvQH4Trnk31ZgtBleldriB3usG08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pZMh1mq6555IRosI6DLOIDUwgGj9CKQn/C7R9kbhfg8wzfEEcdv+vqWJWoop8DhOk fqwfzfdxz4OI5j1914BsuSA037XxA2T9S0ndhmNnu/bsUg0qTRKK0GdWQwXa5mVuqT F3abRg99vT7fAYsK2eI0i64kSnCgwcIypvc0yC1c= 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.8 210/464] media: cros-ec-cec: do not bail on device_init_wakeup failure Date: Mon, 17 Aug 2020 17:12:43 +0200 Message-Id: <20200817143843.870989130@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@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/cec/platform/cros-ec/cros-ec-cec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c index 0e7e2772f08f9..2d95e16cd2489 100644 --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c +++ b/drivers/media/cec/platform/cros-ec/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