Skip to contentSkip to conversation

drivers/leds/leds-pca9633.c: Fix kcalloc parameters swapped

PATCH New Axel Lin 1 participant 1 message Feb 10, 2012 LED

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 drivers/leds/leds-pca9633.c: Fix kcalloc parameters swapped

The first parameter should be "number of elements" and the second parameter should be "element size".

---
 drivers/leds/leds-pca9633.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/leds/leds-pca9633.c +1 -1
index c408ddc..80cb61a 100644
@@ -110,7 +110,7 @@ static int __devinit pca9633_probe(struct i2c_client *client,
 		}
 	}
 
-	pca9633 = kcalloc(sizeof(*pca9633), 4, GFP_KERNEL);
+	pca9633 = kcalloc(4, sizeof(*pca9633), GFP_KERNEL);
 	if (!pca9633)
 		return -ENOMEM;
 
Signature · 1 line
1.7.5.4