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

Commit afeb7b45 authored by Varka Bhadram's avatar Varka Bhadram Committed by Linus Walleij
Browse files

gpio: use (!foo) instead of (foo == NULL)

parent 4878b466
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
	struct gpio_chip *gc;
	int ret, i, revid;

	if (pdata == NULL) {
	if (!pdata) {
		dev_err(&client->dev, "missing platform data\n");
		return -ENODEV;
	}
@@ -379,7 +379,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
	}

	dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL);
	if (dev == NULL)
	if (!dev)
		return -ENOMEM;

	dev->client = client;
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)

	arizona_gpio = devm_kzalloc(&pdev->dev, sizeof(*arizona_gpio),
				    GFP_KERNEL);
	if (arizona_gpio == NULL)
	if (!arizona_gpio)
		return -ENOMEM;

	arizona_gpio->arizona = arizona;
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ static int da9052_gpio_probe(struct platform_device *pdev)
	int ret;

	gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
	if (gpio == NULL)
	if (!gpio)
		return -ENOMEM;

	gpio->da9052 = dev_get_drvdata(pdev->dev.parent);
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ static int da9055_gpio_probe(struct platform_device *pdev)
	int ret;

	gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
	if (gpio == NULL)
	if (!gpio)
		return -ENOMEM;

	gpio->da9055 = dev_get_drvdata(pdev->dev.parent);
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ static int kempld_gpio_probe(struct platform_device *pdev)
	}

	gpio = devm_kzalloc(dev, sizeof(*gpio), GFP_KERNEL);
	if (gpio == NULL)
	if (!gpio)
		return -ENOMEM;

	gpio->pld = pld;
Loading