Re: [PATCH] asoc: mediatek: common: Remove check of return value of mtk_memif_set_addr() and mtk_memif_set_format()

From: Mark Brown
Date: Mon Sep 18 2023 - 13:07:41 EST


On Fri, Aug 25, 2023 at 06:36:50PM +0300, Alexandra Diupina wrote:
> The mtk_memif_set_addr() and mtk_memif_set_format() functions always returns 0, so it is
> necessary to remove the check of its return value (which was
> probably specified by analogy with the check of return values
> for other functions) to make the code more readable

If the return values can be safely ignored the functions should be
updated to return void, if the functions are returning a value it is
sensible defensive programming to check it.

> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: df799b9502ed ("ASoC: mediatek: common: refine hw_params and hw_prepare")

This is in no way a bug fix, please don't include noise like this - it
causes people to waste time doing things like considering it for backport.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

Attachment: signature.asc
Description: PGP signature