kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2] extcon: max77843: fix an error code in max77843_init_muic_regmap()
@ 2015-03-15 10:56 Dan Carpenter
  2015-03-23  1:49 ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-03-15 10:56 UTC (permalink / raw)
  To: MyungJoo Ham; +Cc: Chanwoo Choi, linux-kernel, kernel-janitors

"max77843->i2c_muic" is NULL, not an error code.  Let's return -ENODEV
here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
index a3f80ca..6f0ed5a 100644
--- a/drivers/extcon/extcon-max77843.c
+++ b/drivers/extcon/extcon-max77843.c
@@ -715,7 +715,7 @@ static int max77843_init_muic_regmap(struct max77843 *max77843)
 	if (!max77843->i2c_muic) {
 		dev_err(&max77843->i2c->dev,
 				"Cannot allocate I2C device for MUIC\n");
-		return PTR_ERR(max77843->i2c_muic);
+		return -ENODEV;
 	}
 
 	i2c_set_clientdata(max77843->i2c_muic, max77843);

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

end of thread, other threads:[~2015-03-23  1:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 10:56 [patch 2/2] extcon: max77843: fix an error code in max77843_init_muic_regmap() Dan Carpenter
2015-03-23  1:49 ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).