Re: [media] Siano: Use common error handling code in smsusb_init_device()

2017-09-20 Thread SF Markus Elfring
> If smscore_register_device() succeeds then mdev is freed when we call > smsusb_term_device(intf); The call tree is: Thanks for your constructive information. How do you think about another implementation detail in this function then? May the statement “kfree(mdev);” be executed before

Re: [PATCH] [media] Siano: Use common error handling code in smsusb_init_device()

2017-09-20 Thread Dan Carpenter
On Wed, Sep 20, 2017 at 02:40:28PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 20 Sep 2017 14:30:55 +0200 > > Add a jump target so that a bit of exception handling can be better > reused at the end of this function. > > This refactoring

[PATCH] [media] Siano: Use common error handling code in smsusb_init_device()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 14:30:55 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This refactoring might fix also an error situation where the function "kfree" was not called after a