]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/surface: aggregator: Omit a variable reassignment in ssam_serial_hub_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 20 Oct 2025 14:34:59 +0000 (16:34 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 5 Nov 2025 08:50:00 +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/b25c9842-7ebc-43f0-a411-8098359f81a6@web.de
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/surface/aggregator/core.c

index c58e1fdd1a5f757b5dc1766a2e1d86e5943ab203..c7e05f7bc1999fa3afd9d79300234d629b0cdc5d 100644 (file)
@@ -676,7 +676,7 @@ static int ssam_serial_hub_probe(struct serdev_device *serdev)
 
        status = ssam_serdev_setup(ssh, serdev);
        if (status) {
-               status = dev_err_probe(dev, status, "failed to setup serdev\n");
+               dev_err_probe(dev, status, "failed to setup serdev\n");
                goto err_devinit;
        }