[PATCHv3 2/4] Input: keypad: Add smsc ece1099 keypad driver
Shubhrajyoti
shubhrajyoti at ti.com
Mon Oct 1 10:58:20 EDT 2012
On Monday 01 October 2012 04:31 PM, Sourav Poddar wrote:
> +smsc_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct smsc *smsc = dev_get_drvdata(pdev->dev.parent);
> + struct input_dev *input;
> + struct smsc_keypad *kp;
> + int ret = 0, error;
> + int col, i, max_keys, row_shift;
> + int irq;
> + int addr;
> +
> + kp = devm_kzalloc(dev, sizeof(*kp), GFP_KERNEL);
> +
> + input = input_allocate_device();
> + if (!kp || !input) {
> + error = -ENOMEM;
> + goto err1;
> + }
> +
> + error = smsc_keypad_parse_dt(&pdev->dev, kp);
> + if (error)
> + return error;
>
Are we leaking input here?
More information about the linux-arm-kernel
mailing list