From patchwork Tue Jan 19 18:22:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Stern X-Patchwork-Id: 8064571 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 163B1BEEE5 for ; Tue, 19 Jan 2016 18:22:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1393D2055C for ; Tue, 19 Jan 2016 18:22:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13CE420555 for ; Tue, 19 Jan 2016 18:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932665AbcASSWY (ORCPT ); Tue, 19 Jan 2016 13:22:24 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:33517 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932271AbcASSWY (ORCPT ); Tue, 19 Jan 2016 13:22:24 -0500 Received: (qmail 2107 invoked by uid 2102); 19 Jan 2016 13:22:22 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 19 Jan 2016 13:22:22 -0500 Date: Tue, 19 Jan 2016 13:22:22 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= cc: Linux-pm mailing list , Kernel development list Subject: Crash introduced by commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Message-ID: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Uwe: Your commit causes my ASUS laptop to crash during early boot. The problem occurs in platform_drv_probe(), affecting both the alarmtimer and the asus_laptop platform drivers (I can't tell which is the critical one). The old code would not call platform_drv_probe() at all, and probing would always succeed immediately because these drivers have no probe routine. But with the new code, platform_drv_probe() does run. The call to of_clk_set_defaults() returns -ENODEV, as does the call to dev_pm_domain_attach(). The call to drv->probe() gets skipped, of course. The final return value is -ENODEV, and so probing fails. This causes the kernel to crash: blank screen, NumLock LED blinking. The patch below fixes the problem, but I'm not sure that it's the best solution. What is your advice? Alan Stern --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: usb-4.4/drivers/base/platform.c =================================================================== --- usb-4.4.orig/drivers/base/platform.c +++ usb-4.4/drivers/base/platform.c @@ -524,6 +524,8 @@ static int platform_drv_probe(struct dev ret = -ENXIO; } + if (!drv->probe) + ret = 0; return ret; }