Re: [PATCH] usb: typec: stusb160x: add missing NULL check for i2c_get_match_data()

From: Joshua Crofts

Date: Mon Aug 24 2026 - 03:05:28 EST


On Mon, 24 Aug 2026 09:48:26 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Mon, Aug 24, 2026 at 08:40:41AM +0200, Joshua Crofts wrote:
> > On Thu, 6 Aug 2026 08:43:01 +0000
> > Joshua Crofts <joshua.crofts1@xxxxxxxxx> wrote:
>
> ...
>
> > > regmap_config = i2c_get_match_data(client);
> > > + if (!regmap_config)
> > > + return -ENODEV;
>
> Return -ENODATA here, it will distinguish better in case of debugging.

Yep, this was before our discussion about this in IIO :)

--
Kind regards,
Joshua Crofts