amlogic: bt: Remove memory leak 73/252173/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 25 Jan 2021 06:48:02 +0000 (15:48 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 25 Jan 2021 06:56:31 +0000 (15:56 +0900)
commit326ee33b0b1d2d64ce7f7820c6bd0b96a49f3603
tree4da1f4eabd91b96e9cb69b3383db28b6194cd12c
parent60021b40cb179630c2c7aae90a2a9882a7b18192
amlogic: bt: Remove memory leak

The prdata is covered by pdata from bt_probe, so there is memory
leak for prdata. Remove the memory leak store prdata, and get
pdata from prdata.

This fixes following kmemleak issue:
   unreferenced object 0xffffffc00c39e300 (size 64):
   ...
     backtrace:
       [<ffffff90094318b8>] create_object+0x278/0x580
       [<ffffff900b06e90c>] kmemleak_alloc+0x74/0xa0
       [<ffffff9009409fa0>] kmem_cache_alloc_trace+0x328/0x5e8
       [<ffffff900a850b04>] bt_probe+0x20c/0x870
   ...

Change-Id: Ic3f2091d16806dba0855927d048747b40cb96f80
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/amlogic/bluetooth/bt_device.c