]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: iproc: Drop unnecessary initialisation of 'ret'
authorAndi Shyti <andi.shyti@kernel.org>
Fri, 18 Apr 2025 21:16:26 +0000 (23:16 +0200)
committerAndi Shyti <andi@smida.it>
Mon, 19 May 2025 20:23:56 +0000 (22:23 +0200)
The 'ret' variable doesn't need to be initialised, as it is
always assigned before use.

While here, reorder the variable declarations in reverse
Christmas tree style, by line length.

Link: https://lore.kernel.org/r/20250418211635.2666234-2-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-bcm-iproc.c

index 332a0fcca28d001c0b454a717d1569a93644ee40..5d846ab91e6ff9acc87e0fd8d5693fa7343a6f9e 100644 (file)
@@ -1039,9 +1039,9 @@ static int bcm_iproc_i2c_cfg_speed(struct bcm_iproc_i2c_dev *iproc_i2c)
 
 static int bcm_iproc_i2c_probe(struct platform_device *pdev)
 {
-       int irq, ret = 0;
        struct bcm_iproc_i2c_dev *iproc_i2c;
        struct i2c_adapter *adap;
+       int irq, ret;
 
        iproc_i2c = devm_kzalloc(&pdev->dev, sizeof(*iproc_i2c),
                                 GFP_KERNEL);