The devm_regmap_field_alloc() function never returns NULL, it returns
error pointers. Update the error checking to match.
Fixes: 58128aa88867 ("reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
field.msb = __fls(args[1]);
pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
- if (!pwrrdy)
- return -ENOMEM;
+ if (IS_ERR(pwrrdy))
+ return PTR_ERR(pwrrdy);
rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true);