From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ladislav Michl Date: Mon, 15 Jan 2018 16:05:22 +0000 Subject: Re: [PATCH 1/3] mfd/omap-usb-tll: Delete two error messages for a failed memory allocation in usbtll Message-Id: <20180115160522.GA2672@lenoch> List-Id: References: <7719b4e7-1081-6fa4-6f14-f45cf062482d@users.sourceforge.net> <20180115134101.GA6711@lenoch> <1ebb5ac5-aa4d-7c19-94db-210b518d562f@users.sourceforge.net> In-Reply-To: <1ebb5ac5-aa4d-7c19-94db-210b518d562f@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: SF Markus Elfring Cc: linux-omap@vger.kernel.org, Lee Jones , Tony Lindgren , LKML , kernel-janitors@vger.kernel.org Marcus, On Mon, Jan 15, 2018 at 04:38:43PM +0100, SF Markus Elfring wrote: > >> @@ -258,7 +256,6 @@ static int usbtll_omap_probe(struct platform_devic= e *pdev) > >> GFP_KERNEL); > >> if (!tll->ch_clk) { > >> ret =3D -ENOMEM; > >> - dev_err(dev, "Couldn't allocate memory for channel clocks\n"); > >=20 > > I'd either leave this one, just to know which allocation failed or bett= er use > > something like this =E2=80=A6 >=20 > Are you aware on the structure for a Linux allocation failure report? Just created one (not OMAP and not this driver, but that does not matter no= w): ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at mm/slab_common.c:1012 kmalloc_slab+0x38/0xdc Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc7-next-20180115 #25 Hardware name: Atmel AT91SAM9 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (__warn+0xcc/0xe4) [] (__warn) from [] (warn_slowpath_null+0x38/0x44) [] (warn_slowpath_null) from [] (kmalloc_slab+0x38/0xdc) [] (kmalloc_slab) from [] (__kmalloc_track_caller+0xc/0= xb0) [] (__kmalloc_track_caller) from [] (devm_kmalloc+0x1c/= 0x58) [] (devm_kmalloc) from [] (max9867_i2c_probe+0x1c/0xe0) [] (max9867_i2c_probe) from [] (i2c_device_probe+0x270/= 0x298) [] (i2c_device_probe) from [] (driver_probe_device+0x2b= 4/0x458) [] (driver_probe_device) from [] (__driver_attach+0x7c/= 0xec) [] (__driver_attach) from [] (bus_for_each_dev+0x58/0x7= c) [] (bus_for_each_dev) from [] (bus_add_driver+0x1a8/0x2= 20) [] (bus_add_driver) from [] (driver_register+0xa0/0xe0) [] (driver_register) from [] (i2c_register_driver+0x74/= 0xa0) [] (i2c_register_driver) from [] (do_one_initcall+0x134= /0x15c) [] (do_one_initcall) from [] (kernel_init_freeable+0x17= 8/0x1b4) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x10= 0) [] (kernel_init) from [] (ret_from_fork+0x14/0x34) Exception stack(0xc381bfb0 to 0xc381bff8) bfa0: 00000000 00000000 00000000 000000= 00 bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000000= 00 bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ---[ end trace 3c79eadf2363e939 ]--- max9867: probe of 1-0018 failed with error -12 driver was instructed to alloc insane number of bytes using devm_kzalloc in max9867_i2c_probe. Now, if probe function calls devm_kzalloc two times and one of them fails, you cannot easily say which one without looking at assembly listing. Or did I misunderstand your question? Best regards, ladis -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html