Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
[cascardo/linux.git] / drivers / i2c / busses / i2c-qup.c
index 2a5efb5..3a4d64e 100644 (file)
@@ -633,13 +633,17 @@ static int qup_i2c_probe(struct platform_device *pdev)
         * associated with each byte written/received
         */
        size = QUP_OUTPUT_BLOCK_SIZE(io_mode);
-       if (size >= ARRAY_SIZE(blk_sizes))
-               return -EIO;
+       if (size >= ARRAY_SIZE(blk_sizes)) {
+               ret = -EIO;
+               goto fail;
+       }
        qup->out_blk_sz = blk_sizes[size] / 2;
 
        size = QUP_INPUT_BLOCK_SIZE(io_mode);
-       if (size >= ARRAY_SIZE(blk_sizes))
-               return -EIO;
+       if (size >= ARRAY_SIZE(blk_sizes)) {
+               ret = -EIO;
+               goto fail;
+       }
        qup->in_blk_sz = blk_sizes[size] / 2;
 
        size = QUP_OUTPUT_FIFO_SIZE(io_mode);