mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 07:51:16 -04:00
usb: gadget: s3c-hsotg: Fix invalid free of devm_ allocated data
Since hsotg object is allocated using devm_kzalloc() API, there is no need to free this explicitly. But we need to keep the release API to prevent warnings. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
committed by
Felipe Balbi
parent
c1a96ebd31
commit
69f5165ebe
@@ -3477,12 +3477,11 @@ static void s3c_hsotg_delete_debug(struct s3c_hsotg *hsotg)
|
||||
/**
|
||||
* s3c_hsotg_release - release callback for hsotg device
|
||||
* @dev: Device to for which release is called
|
||||
*
|
||||
* Nothing to do as the resource is allocated using devm_ API.
|
||||
*/
|
||||
static void s3c_hsotg_release(struct device *dev)
|
||||
{
|
||||
struct s3c_hsotg *hsotg = dev_get_drvdata(dev);
|
||||
|
||||
kfree(hsotg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user