Thread (19 messages) 19 messages, 4 authors, 2012-05-17

Re: [PATCH V3 1/2] Input: of_keymap: Introduce matrix_keypad_of_build_keymap()

From: Viresh Kumar <hidden>
Date: 2012-03-30 03:38:57
Also in: linux-devicetree

On 3/29/2012 9:14 PM, Stephen Warren wrote:
quoted
quoted
+	size = proplen / sizeof(u32);
+	if (size > idev->keycodemax) {
+		dev_err(dev, "OF: %s overflow\n", propname);
+		return -EINVAL;
 	}
That is checking the number of entries in the property, not the values
of the MATRIX_SCAN_CODE values derived from those entries. I'd say just
remove this check. See below.
Stephen,

I have added a check on return value of MATRIX_SCAN_CODE(), but
would still keep above check. Number of keys passed should
also be less than keycodemax.

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help