Re: [PATCH] regulator: Check ramp_delay_table for regulator_set_ramp_delay_regmap

From: Mark Brown
Date: Wed May 19 2021 - 09:17:14 EST


On Wed, May 19, 2021 at 03:50:24PM +0800, Axel Lin wrote:

> + if (!rdev->desc->n_ramp_values || !rdev->desc->ramp_delay_table) {
> + WARN_ON(!rdev->desc->n_ramp_values || !rdev->desc->ramp_delay_table);

You can write "if (WARN_ON(..." there and it'll DTRT, though I'm never
sure it's great for readability.

Attachment: signature.asc
Description: PGP signature