All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: ismt: add error return code in probe()
@ 2013-08-23  9:30 Wolfram Sang
       [not found] ` <1377250230-19166-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2013-08-23  9:30 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Wolfram Sang, Seth Heasley, Neil Horman

Return error code in the error case, and not success.

Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
---

Error code itself is probably not perfect, but consistent :/ Improving the
return values might be considered for a later patch. Based on 3.11-rc6.

 drivers/i2c/busses/i2c-ismt.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index cd82eb4..8ed79a0 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -879,6 +879,7 @@ ismt_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 						 DMA_BIT_MASK(32)) != 0)) {
 			dev_err(&pdev->dev, "pci_set_dma_mask fail %p\n",
 				pdev);
+			err = -ENODEV;
 			goto fail;
 		}
 	}
-- 
1.7.10.4

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

* Re: [PATCH] i2c: ismt: add error return code in probe()
       [not found] ` <1377250230-19166-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2013-08-23 12:42   ` Neil Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Horman @ 2013-08-23 12:42 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Seth Heasley

On Fri, Aug 23, 2013 at 11:30:14AM +0200, Wolfram Sang wrote:
> Return error code in the error case, and not success.
> 
> Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>

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

end of thread, other threads:[~2013-08-23 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23  9:30 [PATCH] i2c: ismt: add error return code in probe() Wolfram Sang
     [not found] ` <1377250230-19166-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-08-23 12:42   ` Neil Horman

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.