lkml.org 
[lkml]   [2018]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: pi433: add missing call to cdev_del()
From
Date
On 11/26/18 7:01 PM, Dan Carpenter wrote:
> On Mon, Nov 26, 2018 at 06:53:55PM +0100, Michael Straube wrote:

>> retval = cdev_add(device->cdev, device->devt, 1);
>> if (retval) {
>> dev_dbg(device->dev, "register of cdev failed");
>> + cdev_del(device->cdev);
>> goto cdev_failed;
>
> No no... That's not the right thing. Do "goto del_cdev;" and add a
> label at the end.
>
> del_cdev:
> cdev_del(device->cdev);
>
> regards,
> dan carpenter
>

Ah ok, I thought about that but was not sure. Thanks,
Michael

\
 
 \ /
  Last update: 2018-11-26 19:13    [W:0.190 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site