[PATCH] Staging: media: lirc: Remove unnecessary braces

Shraddha Barke shraddha.6596 at gmail.com
Sat Aug 29 19:16:33 UTC 2015


Fix the checkpatch.pl warning

WARNING: braces {} are not necessary for single statement blocks

Build tested it.

Signed-off-by: Shraddha Barke <shraddha.6596 at gmail.com>
---
 drivers/staging/media/lirc/lirc_imon.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c
index 62ec9f7..cbca56f 100644
--- a/drivers/staging/media/lirc/lirc_imon.c
+++ b/drivers/staging/media/lirc/lirc_imon.c
@@ -785,13 +785,11 @@ static int imon_probe(struct usb_interface *interface,
 	}
 
 	driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL);
-	if (!driver) {
+	if (!driver)
 		goto free_context;
-	}
 	rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
-	if (!rbuf) {
+	if (!rbuf)
 		goto free_driver;
-	}
 	if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) {
 		dev_err(dev, "%s: lirc_buffer_init failed\n", __func__);
 		goto free_rbuf;
-- 
2.1.4



More information about the devel mailing list