diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/pti.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c index bb6f9255c17c..be4857358d91 100644 --- a/drivers/misc/pti.c +++ b/drivers/misc/pti.c | |||
@@ -317,7 +317,8 @@ EXPORT_SYMBOL_GPL(pti_request_masterchannel); | |||
317 | * a master, channel ID address | 317 | * a master, channel ID address |
318 | * used to write to PTI HW. | 318 | * used to write to PTI HW. |
319 | * | 319 | * |
320 | * @mc: master, channel apeture ID address to be released. | 320 | * @mc: master, channel apeture ID address to be released. This |
321 | * will de-allocate the structure via kfree(). | ||
321 | */ | 322 | */ |
322 | void pti_release_masterchannel(struct pti_masterchannel *mc) | 323 | void pti_release_masterchannel(struct pti_masterchannel *mc) |
323 | { | 324 | { |
@@ -581,7 +582,7 @@ static int pti_char_open(struct inode *inode, struct file *filp) | |||
581 | static int pti_char_release(struct inode *inode, struct file *filp) | 582 | static int pti_char_release(struct inode *inode, struct file *filp) |
582 | { | 583 | { |
583 | pti_release_masterchannel(filp->private_data); | 584 | pti_release_masterchannel(filp->private_data); |
584 | kfree(filp->private_data); | 585 | filp->private_data = NULL; |
585 | return 0; | 586 | return 0; |
586 | } | 587 | } |
587 | 588 | ||