Message ID | 17d03396-2abe-4e09-1a86-14773b51073b@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index c7f26fa3034c..f13b50213f94 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -175,10 +175,8 @@ static int nspire_keypad_probe(struct platform_device *pdev) keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad), GFP_KERNEL); - if (!keypad) { - dev_err(&pdev->dev, "failed to allocate keypad memory\n"); + if (!keypad) return -ENOMEM; - } keypad->row_shift = get_count_order(KEYPAD_BITMASK_COLS);