Re: [PATCH] drm/mediatek: fixup error memory reallocation

2017-06-16 Thread YT Shen
On Wed, 2017-06-14 at 09:19 +0800, CK Hu wrote: > On Mon, 2017-06-12 at 15:15 +0800, YT Shen wrote: > > Previous patch (c5f228ef6c drm/mediatek: add *driver_data for different > > hardware settings) calls devm_kfree() and then devm_kzalloc() to > > reallocate color module data structure. But this

Re: [PATCH] drm/mediatek: fixup error memory reallocation

2017-06-13 Thread CK Hu
On Mon, 2017-06-12 at 15:15 +0800, YT Shen wrote: > Previous patch (c5f228ef6c drm/mediatek: add *driver_data for different > hardware settings) calls devm_kfree() and then devm_kzalloc() to > reallocate color module data structure. But this reallocation cannnot > guarantee the new address is unch

[PATCH] drm/mediatek: fixup error memory reallocation

2017-06-12 Thread YT Shen
Previous patch (c5f228ef6c drm/mediatek: add *driver_data for different hardware settings) calls devm_kfree() and then devm_kzalloc() to reallocate color module data structure. But this reallocation cannnot guarantee the new address is unchanged, but the caller will use the old address, which is w