The element size and the number of elements was inverted in the kcalloc
call.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
if (txlen) {
int i;
- local_txbuf = kcalloc(sizeof(*local_txbuf), txlen, GFP_KERNEL);
+ local_txbuf = kcalloc(txlen, sizeof(*local_txbuf), GFP_KERNEL);
if (!local_txbuf) {
dev_err(&lcdev->dev, "Couldn't allocate data buffer.\n");