From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB996C43218 for ; Sun, 28 Apr 2019 16:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EF6E206A3 for ; Sun, 28 Apr 2019 16:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbfD1QmN (ORCPT ); Sun, 28 Apr 2019 12:42:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:36804 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726220AbfD1QmM (ORCPT ); Sun, 28 Apr 2019 12:42:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5764BAE5A; Sun, 28 Apr 2019 16:42:11 +0000 (UTC) Date: Sun, 28 Apr 2019 18:42:10 +0200 Message-ID: From: Takashi Iwai To: "Greg Kroah-Hartman" Cc: "Jaroslav Kysela" , , "Arnd Bergmann" , , Subject: Re: [PATCH] sound: USB: line6: use dynamic buffers In-Reply-To: <20190428160411.GA12815@kroah.com> References: <20190428160411.GA12815@kroah.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 Apr 2019 18:04:11 +0200, Greg Kroah-Hartman wrote: > > --- a/sound/usb/line6/toneport.c > +++ b/sound/usb/line6/toneport.c > @@ -365,16 +365,21 @@ static bool toneport_has_source_select(s > /* > Setup Toneport device. > */ > -static void toneport_setup(struct usb_line6_toneport *toneport) > +static int toneport_setup(struct usb_line6_toneport *toneport) > { > - u32 ticks; > + u32 *ticks; > struct usb_line6 *line6 = &toneport->line6; > struct usb_device *usbdev = line6->usbdev; > > + ticks = kmalloc(sizeof(*ticks), GFP_KERNEL); > + if (!ticks) > + return -ENOMEM; > + > /* sync time on device with host: */ > /* note: 32-bit timestamps overflow in year 2106 */ > - ticks = (u32)ktime_get_real_seconds(); > - line6_write_data(line6, 0x80c6, &ticks, 4); > + *ticks = (u32)ktime_get_real_seconds(); > + line6_write_data(line6, 0x80c6, ticks, 4); > + kfree(ticks); > > /* enable device: */ > toneport_send_cmd(usbdev, 0x0301, 0x0000); This function misses the "return 0" at the end, so I fixed it up manually and applied now. thanks, Takashi