]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86: x86-android-tablets: Omit a variable reassignment in lenovo_yoga_tab2_8...
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 20 Oct 2025 14:52:35 +0000 (16:52 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 5 Nov 2025 08:50:08 +0000 (10:50 +0200)
An error code was assigned to a variable and checked accordingly.
This value was passed to a dev_err_probe() call in an if branch.
This function is documented in the way that the same value is returned.
Thus delete a redundant variable reassignment.

The source code was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patch.msgid.link/90a2385c-9d19-46f2-8d31-618d5c10aa91@web.de
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/x86-android-tablets/lenovo.c

index e3d3a8290949b6cefbbc3a2f47950e6b8da8abe6..8d825e0b4661c0be879160ea963ac167112c41ea 100644 (file)
@@ -543,7 +543,7 @@ static int __init lenovo_yoga_tab2_830_1050_init_codec(void)
 
        ret = device_add_software_node(codec_dev, &lenovo_yoga_tab2_830_1050_wm5102);
        if (ret) {
-               ret = dev_err_probe(codec_dev, ret, "adding software node\n");
+               dev_err_probe(codec_dev, ret, "adding software node\n");
                goto err_put_pinctrl;
        }