linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
@ 2012-09-19  6:27 Dan Carpenter
  2012-09-19 17:08 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-09-19  6:27 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Lars-Peter Clausen, linux-iio, kernel-janitors

We need "ret" to be signed for the error handling to work correctly.

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

diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index e6dbe5f..5db3506 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -451,9 +451,9 @@ static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev,
 	const struct ad5755_platform_data *pdata)
 {
 	struct ad5755_state *st = iio_priv(indio_dev);
-	unsigned int ret;
 	unsigned int val;
 	unsigned int i;
+	int ret;
 
 	if (pdata->dc_dc_phase > AD5755_DC_DC_PHASE_90_DEGREE ||
 		pdata->dc_dc_freq > AD5755_DC_DC_FREQ_650kHZ ||

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

end of thread, other threads:[~2012-09-22  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19  6:27 [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata() Dan Carpenter
2012-09-19 17:08 ` Lars-Peter Clausen
2012-09-22  9:11   ` Jonathan Cameron

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).