public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Jaroslav Kysela" <perex@perex.cz>, <alsa-devel@alsa-project.org>,
	"Arnd Bergmann" <arnd@arndb.de>, <linux-kernel@vger.kernel.org>,
	<linux-usb@vger.kernel.org>
Subject: Re: [PATCH] sound: USB: line6: use dynamic buffers
Date: Sun, 28 Apr 2019 18:42:10 +0200	[thread overview]
Message-ID: <s5hmukakrod.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190428160411.GA12815@kroah.com>

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

  reply	other threads:[~2019-04-28 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28 16:04 [PATCH] sound: USB: line6: use dynamic buffers Greg Kroah-Hartman
2019-04-28 16:42 ` Takashi Iwai [this message]
2019-04-28 17:07   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hmukakrod.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox