i2c: qup: Add missing unwind goto in qup_i2c_probe()
authorShuai Jiang <d202180596@hust.edu.cn>
Tue, 18 Apr 2023 13:56:12 +0000 (21:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:22:08 +0000 (16:22 +0200)
commit8753eeb2d35ab7fd84da7606a5a918940b6cbf7b
tree6b4483864a3cd2ef8c4349b238ceff8ce8a26bcd
parentb990e3760395d346592d4e7370cefc85aa7fc597
i2c: qup: Add missing unwind goto in qup_i2c_probe()

commit cd9489623c29aa2f8cc07088168afb6e0d5ef06d upstream.

Smatch Warns:
drivers/i2c/busses/i2c-qup.c:1784 qup_i2c_probe()
warn: missing unwind goto?

The goto label "fail_runtime" and "fail" will disable qup->pclk,
but here qup->pclk failed to obtain, in order to be consistent,
change the direct return to goto label "fail_dma".

Fixes: 9cedf3b2f099 ("i2c: qup: Add bam dma capabilities")
Signed-off-by: Shuai Jiang <d202180596@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-qup.c