Re: [PATCH] staging: media: atomisp: drop unnecessary else block after return/break

From: Andy Shevchenko

Date: Mon May 04 2026 - 05:23:15 EST


On Sun, May 03, 2026 at 10:52:00PM +0530, Shyam Sunder Reddy Padira wrote:
> Remove redundant else blocks following return or break
> statements.As control flow exits in these cases, the

There is a room for more words on the lines. Also respect English grammar and
punctuation, exempli gratia use space after a punctuation.

> else branch is unnecessary.Dropping it improves code
> readability.
>
> No functional change.

...

Code wise almost good, see below.


> + pci_read_config_dword(pdev, PCI_INTERRUPT_CTRL, &irq);
> + irq &= BIT(INTR_IIR);
> + pci_write_config_dword(pdev, PCI_INTERRUPT_CTRL, irq);
> +
> + pci_read_config_dword(pdev, PCI_INTERRUPT_CTRL, &irq);
> + if (!(irq & BIT(INTR_IIR))) {
> + atomisp_css2_hw_store_32(MRFLD_INTR_ENABLE_REG, 0x0);
> + goto done;
> + }

> + dev_err(isp->dev,
> + "%s: error in iunit interrupt. status reg=0x%x\n",
> + __func__, irq);

Now it may occupy two lines only.

dev_err(isp->dev, "%s: error in iunit interrupt. status reg=0x%x\n",
__func__, irq);

> + spin_unlock_irqrestore(&isp->lock, flags);
> + return -EAGAIN;

--
With Best Regards,
Andy Shevchenko