Commit 38980ec4 authored by Hemant Kumar's avatar Hemant Kumar Committed by Sudhir Sharma
Browse files

usb: ks_bridge: Fix memory leaks in the driver.



This change addresses two memory leaks:-
1) misc device is not getting deregistered during device
disconnect. Hence call misc_deregister() in disconnect.

2) Driver returns without freeing previous instances of
the driver data structure if memory allocation fails. Hence
free up memory allocated for ks_bridge structure.

Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit da86bd2f)

Conflicts:

	drivers/usb/misc/ks_bridge.c

Change-Id: I5e1c357fa29b455bae5f3dc71b4d65d5cc216bb3
Signed-off-by: default avatarSudhir Sharma <sudsha@codeaurora.org>
parent 8024268d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment