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

Commit bfb623c5 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman
Browse files

staging: mt7621-gpio: avoid check for NULL in 'to_mediatek_gpio' calls



Function 'to_mediatek_gpio' cannot return NULL, so this NULL
checkings are pointless.

Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e55d7c9
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -115,9 +115,6 @@ mediatek_gpio_irq_unmask(struct irq_data *d)
	unsigned long flags;
	u32 rise, fall, high, low;

	if (!rg)
		return;

	spin_lock_irqsave(&rg->lock, flags);
	rise = mtk_gpio_r32(rg, GPIO_REG_REDGE);
	fall = mtk_gpio_r32(rg, GPIO_REG_FEDGE);
@@ -139,9 +136,6 @@ mediatek_gpio_irq_mask(struct irq_data *d)
	unsigned long flags;
	u32 rise, fall, high, low;

	if (!rg)
		return;

	spin_lock_irqsave(&rg->lock, flags);
	rise = mtk_gpio_r32(rg, GPIO_REG_REDGE);
	fall = mtk_gpio_r32(rg, GPIO_REG_FEDGE);
@@ -162,9 +156,6 @@ mediatek_gpio_irq_type(struct irq_data *d, unsigned int type)
	int pin = d->hwirq;
	u32 mask = BIT(pin);

	if (!rg)
		return -1;

	if (type == IRQ_TYPE_PROBE) {
		if ((rg->rising | rg->falling |
		     rg->hlevel | rg->llevel) & mask)