From: Lei Huang <huanglei814@163.com>
To: mchehab@kernel.org
Cc: johan@kernel.org, hverkuil+cisco@kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Lei Huang <huanglei@kylinos.cn>
Subject: [PATCH v2 01/17] media: s2255: Rename CamelCase goto labels to snake_case
Date: Mon, 20 Jul 2026 10:54:30 +0800 [thread overview]
Message-ID: <20260720025438.207149-2-huanglei814@163.com> (raw)
In-Reply-To: <20260720025438.207149-1-huanglei814@163.com>
From: Lei Huang <huanglei@kylinos.cn>
Rename the error-path goto labels in s2255_probe() from CamelCase to
snake_case to comply with the Linux kernel coding style:
errorBOARDINIT -> err_boardinit
errorFWMARKER -> err_fwmarker
errorREQFW -> err_reqfw
errorFWDATA2 -> err_fwdata2
errorFWURB -> err_fwurb
errorEP -> err_ep
errorUDEV -> err_udev
errorFWDATA1 -> err_fwdata1
No functional changes; all label definitions and goto references are
updated consistently.
Signed-off-by: Lei Huang <huanglei@kylinos.cn>
---
drivers/media/usb/s2255/s2255drv.c | 38 +++++++++++++++---------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 3917913c3b47..64140b780e63 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -2216,14 +2216,14 @@ static int s2255_probe(struct usb_interface *interface,
dev->cmdbuf = kzalloc(S2255_CMDBUF_SIZE, GFP_KERNEL);
if (dev->cmdbuf == NULL) {
s2255_dev_err(&interface->dev, "out of memory\n");
- goto errorFWDATA1;
+ goto err_fwdata1;
}
refcount_set(&dev->num_channels, 0);
dev->pid = id->idProduct;
dev->fw_data = kzalloc_obj(struct s2255_fw);
if (!dev->fw_data)
- goto errorFWDATA1;
+ goto err_fwdata1;
mutex_init(&dev->lock);
mutex_init(&dev->cmdlock);
/* grab usb_device and save it */
@@ -2231,7 +2231,7 @@ static int s2255_probe(struct usb_interface *interface,
if (dev->udev == NULL) {
dev_err(&interface->dev, "null usb device\n");
retval = -ENODEV;
- goto errorUDEV;
+ goto err_udev;
}
dev_dbg(&interface->dev, "dev: %p, udev %p interface %p\n",
dev, dev->udev, interface);
@@ -2243,7 +2243,7 @@ static int s2255_probe(struct usb_interface *interface,
if (usb_find_bulk_in_endpoint(iface_desc, &endpoint)) {
dev_err(&interface->dev, "Could not find bulk-in endpoint\n");
- goto errorEP;
+ goto err_ep;
}
dev->read_endpoint = endpoint->bEndpointAddress;
@@ -2262,32 +2262,32 @@ static int s2255_probe(struct usb_interface *interface,
dev->fw_data->fw_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->fw_data->fw_urb)
- goto errorFWURB;
+ goto err_fwurb;
dev->fw_data->pfw_data = kzalloc(CHUNK_SIZE, GFP_KERNEL);
if (!dev->fw_data->pfw_data) {
dev_err(&interface->dev, "out of memory!\n");
- goto errorFWDATA2;
+ goto err_fwdata2;
}
/* load the first chunk */
if (request_firmware(&dev->fw_data->fw,
FIRMWARE_FILE_NAME, &dev->udev->dev)) {
dev_err(&interface->dev, "sensoray 2255 failed to get firmware\n");
- goto errorREQFW;
+ goto err_reqfw;
}
/* check the firmware is valid */
fw_size = dev->fw_data->fw->size;
if (fw_size < 8) {
dev_err(&interface->dev, "Firmware invalid: too small.\n");
retval = -ENODEV;
- goto errorFWMARKER;
+ goto err_fwmarker;
}
pdata = (__le32 *) &dev->fw_data->fw->data[fw_size - 8];
if (*pdata != S2255_FW_MARKER) {
dev_err(&interface->dev, "Firmware invalid.\n");
retval = -ENODEV;
- goto errorFWMARKER;
+ goto err_fwmarker;
} else {
/* make sure firmware is the latest */
__le32 *pRel;
@@ -2305,30 +2305,30 @@ static int s2255_probe(struct usb_interface *interface,
/* load 2255 board specific */
retval = s2255_board_init(dev);
if (retval)
- goto errorBOARDINIT;
+ goto err_boardinit;
s2255_fwload_start(dev);
/* loads v4l specific */
retval = s2255_probe_v4l(dev);
if (retval)
- goto errorBOARDINIT;
+ goto err_boardinit;
dev_info(&interface->dev, "Sensoray 2255 detected\n");
return 0;
-errorBOARDINIT:
+err_boardinit:
s2255_board_shutdown(dev);
-errorFWMARKER:
+err_fwmarker:
release_firmware(dev->fw_data->fw);
-errorREQFW:
+err_reqfw:
kfree(dev->fw_data->pfw_data);
-errorFWDATA2:
+err_fwdata2:
usb_free_urb(dev->fw_data->fw_urb);
-errorFWURB:
+err_fwurb:
timer_shutdown_sync(&dev->timer);
-errorEP:
+err_ep:
usb_put_dev(dev->udev);
-errorUDEV:
+err_udev:
kfree(dev->fw_data);
mutex_destroy(&dev->lock);
-errorFWDATA1:
+err_fwdata1:
kfree(dev->cmdbuf);
kfree(dev);
pr_warn("Sensoray 2255 driver load failed: 0x%x\n", retval);
--
2.25.1
next prev parent reply other threads:[~2026-07-20 2:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 2:54 [PATCH v2 00/17] media: s2255: Coding style cleanup Lei Huang
2026-07-20 2:54 ` Lei Huang [this message]
2026-07-20 2:54 ` [PATCH v2 02/17] media: s2255: Rename remaining CamelCase identifiers to snake_case Lei Huang
2026-07-20 2:54 ` [PATCH v2 03/17] media: s2255: Remove unnecessary spaces after casts Lei Huang
2026-07-20 2:54 ` [PATCH v2 04/17] media: s2255: Use consistent braces on all arms of if/else statements Lei Huang
2026-07-20 2:54 ` [PATCH v2 05/17] media: s2255: Replace NULL comparisons with ! notation Lei Huang
2026-07-20 2:54 ` [PATCH v2 06/17] media: s2255: Fix alignment to match open parenthesis Lei Huang
2026-07-20 2:54 ` [PATCH v2 07/17] media: s2255: Remove multiple blank lines and before close braces Lei Huang
2026-07-20 2:54 ` [PATCH v2 08/17] media: s2255: Add blank lines after function/struct/enum declarations Lei Huang
2026-07-20 2:54 ` [PATCH v2 09/17] media: s2255: Add spaces around multiplication operators Lei Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260720025438.207149-2-huanglei814@163.com \
--to=huanglei814@163.com \
--cc=huanglei@kylinos.cn \
--cc=hverkuil+cisco@kernel.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®