Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756232AbcDLHkd (ORCPT ); Tue, 12 Apr 2016 03:40:33 -0400 Received: from mail-ig0-f196.google.com ([209.85.213.196]:36373 "EHLO mail-ig0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756084AbcDLHkb (ORCPT ); Tue, 12 Apr 2016 03:40:31 -0400 MIME-Version: 1.0 In-Reply-To: <1459935952-4639-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1459935952-4639-1-git-send-email-sjoerd.simons@collabora.co.uk> Date: Tue, 12 Apr 2016 09:40:30 +0200 X-Google-Sender-Auth: eyTgT0rBvD0h6Y8pQJxBZwGTzRE Message-ID: Subject: Re: [PATCH] drm: rcar-du: Only unwindow as necessary on probe failure From: Geert Uytterhoeven To: Sjoerd Simons Cc: Laurent Pinchart , linux-renesas-soc@vger.kernel.org, "linux-kernel@vger.kernel.org" , DRI Development Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2501 Lines: 50 Hi Sjoerd, On Wed, Apr 6, 2016 at 11:45 AM, Sjoerd Simons wrote: > Simply calling rcar_du_remove on any error can cause unbalanced calls to > various functions (e.g. drm_connector_register/unregister, > drm_dev_register/drm_dev_unref). > > This can be seen at bootup of my Porter boards with current next: > > [ 2.789322] rcar-du feb00000.display: failed to initialize DRM/KMS (-517) > [ 2.796267] ------------[ cut here ]------------ > [ 2.800996] WARNING: CPU: 1 PID: 1 at include/drm/drm_crtc.h:2623 drm_connector_unregister_all+0x60/0x68 > [ 2.810689] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc2-next-20160405-dirty #11 > [ 2.818864] Hardware name: Generic R8A7791 (Flattened Device Tree) > [ 2.825174] Backtrace: > [ 2.827699] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) > [ 2.835430] r7:c042da78 r6:00000009 r5:60000013 r4:00000000 > [ 2.841251] [] (show_stack) from [] (dump_stack+0x84/0xa4) > [ 2.848632] [] (dump_stack) from [] (__warn+0xd0/0x100) > [ 2.855739] r5:00000000 r4:00000000 > [ 2.859409] [] (__warn) from [] (warn_slowpath_null+0x28/0x30) > [ 2.867139] r9:00000001 r8:ef1dc610 r7:ef114010 r6:ef1dc600 r5:ef114010 r4:ef2f2400 > [ 2.875096] [] (warn_slowpath_null) from [] (drm_connector_unregister_all+0x60/0x68) > [ 2.884785] [] (drm_connector_unregister_all) from [] (rcar_du_remove+0x1c/0x5c) > [ 2.894111] r5:ef114010 r4:ef2f2400 > [ 2.897780] [] (rcar_du_remove) from [] (rcar_du_probe+0x1d0/0x210) > [ 2.905953] r5:ef2f2400 r4:fffffdfb > [ 2.909625] [] (rcar_du_probe) from [] (platform_drv_probe+0x58/0xa8) > [ 2.917976] r9:00000000 r8:c0a1cca4 r7:c0a71a48 r6:c0a1cca4 r5:ef1dc610 r4:c0440b80 > > Adjust the code to only unwind as necessary on probe failures > > Signed-off-by: Sjoerd Simons Thanks! I can confirm your patch fixes the same warning on r8a7791/koelsch, so I'll include it in today's renesas-drivers release. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds