Re: [PATCH v1] i2c: i801: Avoid memory leak in check_acpi_smo88xx_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

On Fri, 16 Aug 2019 16:17:05 +0300, Andy Shevchenko wrote:
> check_acpi_smo88xx_device() utilizes acpi_get_object_info() which in its turn
> allocates a buffer. User is responsible to clean allocated resources. The last
> has been missed in the original code. Fix it here.

FYI checkpatch.pl recommends not exceeding 75 columns for patch
descriptions (presumably because you get 4 blanks added in front by git
later).

> 
> While here, replace !ACPI_SUCCESS() with ACPI_FAILURE().
> 
> Fixes: 19b07cb4a187 ("i2c: i801: Register optional lis3lv02d I2C device on Dell machines")
> Cc: Pali Rohár <pali.rohar@xxxxxxxxx>
> Cc: Jean Delvare <jdelvare@xxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-i801.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> (...)

Good catch.

Reviewed-by: Jean Delvare <jdelvare@xxxxxxx>

-- 
Jean Delvare
SUSE L3 Support



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux