Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe

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>

authored by

Dan Carpenter and committed by
Philipp Zabel
cea5d43b da91533c

+2 -2
+2 -2
drivers/reset/reset-rzg2l-usbphy-ctrl.c
··· 158 158 field.msb = __fls(args[1]); 159 159 160 160 pwrrdy = devm_regmap_field_alloc(dev, regmap, field); 161 - if (!pwrrdy) 162 - return -ENOMEM; 161 + if (IS_ERR(pwrrdy)) 162 + return PTR_ERR(pwrrdy); 163 163 164 164 rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true); 165 165