All of lore.kernel.org
 help / color / mirror / Atom feed
* [rtc-linux] [PATCH] rtc: hid-sensor-time: remove some dead code
@ 2017-04-12  8:32 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-04-12  8:32 UTC (permalink / raw)
  To: Alessandro Zummo; +Cc: Alexandre Belloni, rtc-linux, kernel-janitors

devm_rtc_device_register() doesn't ever return NULL so there is no need
to check.

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

diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c
index c398f74234c6..2751dba850c6 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor-time.c
@@ -291,9 +291,9 @@ static int hid_time_probe(struct platform_device *pdev)
 					"hid-sensor-time", &hid_time_rtc_ops,
 					THIS_MODULE);
 
-	if (IS_ERR_OR_NULL(time_state->rtc)) {
+	if (IS_ERR(time_state->rtc)) {
 		hid_device_io_stop(hsdev->hdev);
-		ret = time_state->rtc ? PTR_ERR(time_state->rtc) : -ENODEV;
+		ret = PTR_ERR(time_state->rtc);
 		time_state->rtc = NULL;
 		dev_err(&pdev->dev, "rtc device register failed!\n");
 		goto err_rtc;

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH] rtc: hid-sensor-time: remove some dead code
@ 2017-04-12  8:32 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-04-12  8:32 UTC (permalink / raw)
  To: Alessandro Zummo; +Cc: Alexandre Belloni, rtc-linux, kernel-janitors

devm_rtc_device_register() doesn't ever return NULL so there is no need
to check.

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

diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c
index c398f74234c6..2751dba850c6 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor-time.c
@@ -291,9 +291,9 @@ static int hid_time_probe(struct platform_device *pdev)
 					"hid-sensor-time", &hid_time_rtc_ops,
 					THIS_MODULE);
 
-	if (IS_ERR_OR_NULL(time_state->rtc)) {
+	if (IS_ERR(time_state->rtc)) {
 		hid_device_io_stop(hsdev->hdev);
-		ret = time_state->rtc ? PTR_ERR(time_state->rtc) : -ENODEV;
+		ret = PTR_ERR(time_state->rtc);
 		time_state->rtc = NULL;
 		dev_err(&pdev->dev, "rtc device register failed!\n");
 		goto err_rtc;

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

* [rtc-linux] Re: [PATCH] rtc: hid-sensor-time: remove some dead code
  2017-04-12  8:32 ` Dan Carpenter
@ 2017-04-25 10:50   ` Alexandre Belloni
  -1 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2017-04-25 10:50 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Alessandro Zummo, rtc-linux, kernel-janitors

On 12/04/2017 at 11:32:53 +0300, Dan Carpenter wrote:
> devm_rtc_device_register() doesn't ever return NULL so there is no need
> to check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

* Re: [PATCH] rtc: hid-sensor-time: remove some dead code
@ 2017-04-25 10:50   ` Alexandre Belloni
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2017-04-25 10:50 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Alessandro Zummo, rtc-linux, kernel-janitors

On 12/04/2017 at 11:32:53 +0300, Dan Carpenter wrote:
> devm_rtc_device_register() doesn't ever return NULL so there is no need
> to check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-04-25 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12  8:32 [rtc-linux] [PATCH] rtc: hid-sensor-time: remove some dead code Dan Carpenter
2017-04-12  8:32 ` Dan Carpenter
2017-04-25 10:50 ` [rtc-linux] " Alexandre Belloni
2017-04-25 10:50   ` Alexandre Belloni

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.