Re: [PATCH 2/3] ser_gigaset: fix deallocation of platform device structure

2015-12-12 Thread Tilman Schmidt
Hi Peter, Am 10.12.2015 um 15:04 schrieb Peter Hurley: --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c @@ -370,19 +370,23 @@ static void gigaset_freecshw(struct cardstate *cs) tasklet_kill(&cs->write_tasklet); if (!cs->hw.ser)

Re: [PATCH 2/3] ser_gigaset: fix deallocation of platform device structure

2015-12-10 Thread Peter Hurley
Hi Tilman, On 12/09/2015 03:10 AM, Tilman Schmidt wrote: > Am 09.12.2015 um 00:12 schrieb Paul Bolle: > >>> --- a/drivers/isdn/gigaset/ser-gigaset.c >>> +++ b/drivers/isdn/gigaset/ser-gigaset.c >>> @@ -370,19 +370,23 @@ static void gigaset_freecshw(struct cardstate >>> *cs) >>> tasklet_kill(&

Re: [PATCH 2/3] ser_gigaset: fix deallocation of platform device structure

2015-12-10 Thread Paul Bolle
On wo, 2015-12-09 at 12:10 +0100, Tilman Schmidt wrote: > Am 09.12.2015 um 00:12 schrieb Paul Bolle: > > So what does setting > > cs->hw.ser->dev.dev.driver_data to NULL just before freeing it buy > > us? > > We're freeing cs->hw.ser, not cs->hw.ser->dev. > Clearing the reference to cs from the d

Re: [PATCH 2/3] ser_gigaset: fix deallocation of platform device structure

2015-12-09 Thread Tilman Schmidt
Am 09.12.2015 um 00:12 schrieb Paul Bolle: >> --- a/drivers/isdn/gigaset/ser-gigaset.c >> +++ b/drivers/isdn/gigaset/ser-gigaset.c >> @@ -370,19 +370,23 @@ static void gigaset_freecshw(struct cardstate >> *cs) >> tasklet_kill(&cs->write_tasklet); >> if (!cs->hw.ser) >> retur

Re: [PATCH 2/3] ser_gigaset: fix deallocation of platform device structure

2015-12-08 Thread Paul Bolle
Hi Tilman, On di, 2015-12-08 at 12:00 +0100, Tilman Schmidt wrote: > When shutting down the device, the struct ser_cardstate must not be > kfree()d immediately after the call to platform_device_unregister() > since the embedded struct platform_device is still in use. > Move the kfree() call to the