]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
regulator: bd96801: Delete unnecessary check in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 12 Jul 2024 14:05:39 +0000 (09:05 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 29 Jul 2024 00:19:04 +0000 (01:19 +0100)
The "idesc" pointer points to the middle of rdesc[] array so it can't be
NULL.  Also rdesc isn't NULL.  Delete the check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/01cd578f-127b-4c8b-a8c6-5e11a0a2555c@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/bd96801-regulator.c

index 46ca81f187033ec0aa94f5108324000ef8571924..ec5b1a6b19e87c4c823620cb000c32ea56db8a45 100644 (file)
@@ -853,8 +853,6 @@ static int bd96801_probe(struct platform_device *pdev)
                        ldo_errs_arr[temp_notif_ldos] = rdesc[i].ldo_errs;
                        temp_notif_ldos++;
                }
-               if (!idesc)
-                       continue;
 
                /* Register INTB handlers for configured protections */
                for (j = 0; j < idesc->num_irqs; j++) {