Re: [PATCH] sparc: vio: use put_device() instead of kfree()

From: David Miller
Date: Mon Apr 30 2018 - 16:10:07 EST


From: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
Date: Wed, 25 Apr 2018 20:26:14 +0530

> Never directly free @dev after calling device_register(), even
> if it returned an error. Always use put_device() to give up the
> reference initialized.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>

Applied and queued up for -stable, thanks.