Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f74c066 authored by Shubhrajyoti D's avatar Shubhrajyoti D Committed by Dmitry Torokhov
Browse files

Input: twl4030_keypad - avoid potential NULL-pointer dereference

parent e28e1d93
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
	u8 reg;
	int error;

	if (!pdata || !pdata->rows || !pdata->cols ||
	if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
	    pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) {
		dev_err(&pdev->dev, "Invalid platform_data\n");
		return -EINVAL;