Messages in this thread | | | Date | Wed, 15 Feb 2023 14:01:27 +0000 | From | Mark Brown <> | Subject | Re: [PATCH] regulator: max597x: Align for simple_mfd_i2c driver |
| |
On Tue, Feb 14, 2023 at 11:13:20AM +0100, Naresh Solanki wrote:
> + if (of_device_is_compatible(i2c->dev.of_node, "maxim,max5978")) > + max597x->num_switches = MAX597x_TYPE_MAX5978; > + else > + max597x->num_switches = MAX597x_TYPE_MAX5970;
It looks like this will break if there's any more variants, it looks like it should be checking each compatible in turn and erroring out if nothing matches somehow. [unhandled content-type:application/pgp-signature] | |