All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mfd: remove dead code from drivers/mfd/max8997-irq.c:get_i2c()
@ 2011-07-04  1:16 MyungJoo Ham
  0 siblings, 0 replies; 3+ messages in thread
From: MyungJoo Ham @ 2011-07-04  1:16 UTC (permalink / raw)
  To: Jesper Juhl, linux-kernel; +Cc: Samuel Ortiz

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1320 bytes --]

Sender : Jesper Juhl<jj@chaosbits.net> Date : 2011-07-03 05:38 (GMT+09:00)
> 
> We either hit one of the case's or the default in the switch statement
> in get_i2c(), so the 'return ERR_PTR(-EINVAL);' at the end of the
> function is just dead code - remove it.
> 
> Signed-off-by: Jesper Juhl 

Looks good.

Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>

> ---
> drivers/mfd/max8997-irq.c |    2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
> index 638bf7e..09274cf 100644
> --- a/drivers/mfd/max8997-irq.c
> +++ b/drivers/mfd/max8997-irq.c
> @@ -58,8 +58,6 @@ static struct i2c_client *get_i2c(struct max8997_dev *max8997,
> default:
> return ERR_PTR(-EINVAL);
> }
> -
> - return ERR_PTR(-EINVAL);
> }
> 
> struct max8997_irq_data {
> -- 
> 1.7.6
> 
> 
> -- 
> Jesper Juhl        http://www.chaosbits.net/
> Don't top-post http://www.catb.org/jargon/html/T/top-post.html
> Plain text mails only, please.

 MyungJoo Ham (ÇÔ¸íÁÖ)
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: +82-10-6714-2858 / office: +82-31-279-8033ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: remove dead code from drivers/mfd/max8997-irq.c:get_i2c()
  2011-07-02 20:38 Jesper Juhl
@ 2011-07-04 17:34 ` Samuel Ortiz
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2011-07-04 17:34 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel, MyungJoo Ham

Hi Jesper,

On Sat, Jul 02, 2011 at 10:38:11PM +0200, Jesper Juhl wrote:
> We either hit one of the case's or the default in the switch statement
> in get_i2c(), so the 'return ERR_PTR(-EINVAL);' at the end of the
> function is just dead code - remove it.
Thanks, patch applied.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] mfd: remove dead code from drivers/mfd/max8997-irq.c:get_i2c()
@ 2011-07-02 20:38 Jesper Juhl
  2011-07-04 17:34 ` Samuel Ortiz
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2011-07-02 20:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Samuel Ortiz, MyungJoo Ham

We either hit one of the case's or the default in the switch statement
in get_i2c(), so the 'return ERR_PTR(-EINVAL);' at the end of the
function is just dead code - remove it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/mfd/max8997-irq.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 638bf7e..09274cf 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -58,8 +58,6 @@ static struct i2c_client *get_i2c(struct max8997_dev *max8997,
 	default:
 		return ERR_PTR(-EINVAL);
 	}
-
-	return ERR_PTR(-EINVAL);
 }
 
 struct max8997_irq_data {
-- 
1.7.6


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-04 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04  1:16 [PATCH] mfd: remove dead code from drivers/mfd/max8997-irq.c:get_i2c() MyungJoo Ham
  -- strict thread matches above, loose matches on Subject: below --
2011-07-02 20:38 Jesper Juhl
2011-07-04 17:34 ` Samuel Ortiz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.