This patch removes check before freeing the memory
since kfree(NULL) is safe
Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
PRINT_ER("SPI transaction failed\n");
}
}
- if (r_buffer)
- kfree(r_buffer);
+ kfree(r_buffer);
} else {
PRINT_ER("can't write data with the following length: %d\n", len);
PRINT_ER("FAILED due to NULL buffer or ZERO length check the following length: %d\n", len);
}
}
- if (t_buffer)
- kfree(t_buffer);
+ kfree(t_buffer);
} else {
PRINT_ER("can't read data with the following length: %ld\n", rlen);
ret = -1;