[PATCH v2] scsi: ufs: fix potential memory leak

2016-06-07 Thread Tiezhu Yang
If the function ufshcd_parse_clock_info returns an error, the memory clkfreq allocated by devm_kzalloc will be freed at that time. But when the function ufshcd_parse_clock_info returns 0 on success, there exists potential memory leak, this patch fixes it. Signed-off-by: Tiezhu Yang

[PATCH v2] scsi: ufs: fix potential memory leak

2016-06-07 Thread Tiezhu Yang
If the function ufshcd_parse_clock_info returns an error, the memory clkfreq allocated by devm_kzalloc will be freed at that time. But when the function ufshcd_parse_clock_info returns 0 on success, there exists potential memory leak, this patch fixes it. Signed-off-by: Tiezhu Yang ---