Re: [PATCH v1 2/4] ASoC: Intel: bytcr_rt5640: Use temporary variable for struct device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2021-10-06 at 18:04 +0300, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

trivia:

Some will complain about a lack of commit message.

> diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
[]
> @@ -1536,7 +1536,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
>  		put_device(&adev->dev);
>  		byt_rt5640_dais[dai_index].codecs->name = byt_rt5640_codec_name;
>  	} else {
> -		dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id);
> +		dev_err(dev, "Error cannot find '%s' dev\n", mach->id);
>  		return -ENXIO;
>  	}

And code that does

	if (foo) {
		[code...]
	} else {
		log_msg();
		return -ERR;
	}

should generally have its test reversed and use an unindented block.

	if (!foo) {
		log_msg();
		return -ERR;
	}
	[code...];





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux