mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hoang Tran <hoangtran.gwr@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan <alan@linux.intel.com>,
	Garret Kelly <garret.kelly@gmail.com>,
	Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>,
	Jun Tian <jun.j.tian@intel.com>
Cc: Hoang Tran <hoangtran.gwr@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: goldfish: fix coding style.
Date: Mon, 16 Jun 2014 15:18:37 +0800	[thread overview]
Message-ID: <1402903117-16073-1-git-send-email-hoangtran.gwr@gmail.com> (raw)

Using an else following a break or return can unnecessarily
indent code blocks.

This patch fixes coding style reported by checkpatch.pl, a part
of eudyptula challenge.

Signed-off-by: Hoang Tran <hoangtran.gwr@gmail.com>
---
 drivers/staging/goldfish/goldfish_audio.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index cbd4567..a166424 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -203,10 +203,10 @@ static int goldfish_audio_open(struct inode *ip, struct file *fp)
 					     AUDIO_INT_WRITE_BUFFER_2_EMPTY);
 		AUDIO_WRITE(audio_data, AUDIO_INT_ENABLE, AUDIO_INT_MASK);
 		return 0;
-	} else {
-		atomic_dec(&open_count);
-		return -EBUSY;
 	}
+
+	atomic_dec(&open_count);
+	return -EBUSY;
 }
 
 static int goldfish_audio_release(struct inode *ip, struct file *fp)
@@ -223,8 +223,8 @@ static long goldfish_audio_ioctl(struct file *fp, unsigned int cmd,
 	/* temporary workaround, until we switch to the ALSA API */
 	if (cmd == 315)
 		return -1;
-	else
-		return 0;
+
+	return 0;
 }
 
 static irqreturn_t goldfish_audio_interrupt(int irq, void *dev_id)
-- 
2.0.0


                 reply	other threads:[~2014-06-16  7:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1402903117-16073-1-git-send-email-hoangtran.gwr@gmail.com \
    --to=hoangtran.gwr@gmail.com \
    --cc=alan@linux.intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=garret.kelly@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.j.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tuomas.tynkkynen@iki.fi \
    /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®