[PATCH 2/4] staging: vme_user: Fix unbalanced {} in if-else blocks

Soumya Negi
2023-10-13T23:47:39Z

Add missing braces so that {} are balanced in all arms of if-else
statements as per Linux coding style. Issue found by checkpatch.pl

Signed-off-by: Soumya Negi <soumya.negi97@gmail.com>
---
drivers/staging/vme_user/vme.c | 3 ++-
drivers/staging/vme_user/vme_tsi148.c | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
index 80083ea0fb53..6519a7c994a0 100644
--- a/drivers/staging/vme_user/vme.c
+++ b/drivers/staging/vme_user/vme.c
@@ -1849,8 +1849,9 @@ static int __vme_register_driver_bus(struct vme_driver *drv,
if (vdev->dev.platform_data) {
list_add_tail(&vdev->drv_list, &drv->devices);
list_add_tail(&vdev->bridge_list, &bridge->devices);
- } else
+ } else {
device_unregister(&vdev->dev);
+ }
}
return 0;

diff --git a/drivers/staging/vme_user/vme_tsi148.c b/drivers/staging/vme_user/vme_tsi148.c
index 2f5eafd50934..d549c22da534 100644
--- a/drivers/staging/vme_user/vme_tsi148.c
+++ b/drivers/staging/vme_user/vme_tsi148.c
@@ -2118,8 +2118,9 @@ static int tsi148_slot_get(struct vme_bridge *tsi148_bridge)
if (!geoid) {
slot = ioread32be(bridge->base + TSI148_LCSR_VSTAT);
slot = slot & TSI148_LCSR_VSTAT_GA_M;
- } else
+ } else {
slot = geoid;
+ }

return (int)slot;
}
@@ -2196,9 +2197,9 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
dev_info(tsi148_bridge->parent, "CR/CSR Offset: %d\n", cbar);

crat = ioread32be(bridge->base + TSI148_LCSR_CRAT);
- if (crat & TSI148_LCSR_CRAT_EN)
+ if (crat & TSI148_LCSR_CRAT_EN) {
dev_info(tsi148_bridge->parent, "CR/CSR already enabled\n");
- else {
+ } else {
dev_info(tsi148_bridge->parent, "Enabling CR/CSR space\n");
iowrite32be(crat | TSI148_LCSR_CRAT_EN,
bridge->base + TSI148_LCSR_CRAT);
--
2.42.0