lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Dec 2008 11:01:51 +0800
From:	"Helight.Xu" <zhwenxu@...il.com>
To:	David Brownell <dbrownell@...rs.sourceforge.net>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	torvalds@...ux-foundation.org
Subject: [PATCH] rewrite the return method of static int
	s3c24xx_spi_setup(struct spi_device *spi) in
	drivers/spi/spi_s3c24xx.c 

rewrite the return method of static int 
s3c24xx_spi_setup(struct spi_device *spi) 
in drivers/spi/spi_s3c24xx.c 

reason:
s3c24xx_spi_setupxfer(spi, NULL) return 0 or -EINVAL, 
so here shoud return the ret,but only 0.

here:
 drivers/spi/spi_s3c24xx.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 3eb414b..0489254 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -165,14 +165,14 @@ static int s3c24xx_spi_setup(struct spi_device *spi)
        ret = s3c24xx_spi_setupxfer(spi, NULL);
        if (ret < 0) {
                dev_err(&spi->dev, "setupxfer returned %d\n", ret);
-               return ret;
+               goto err;
        }
 
        dev_dbg(&spi->dev, "%s: mode %d, %u bpw, %d hz\n",
                __func__, spi->mode, spi->bits_per_word,
                spi->max_speed_hz);
-                                                                                        
-       return 0;
+err:
+       return ret;
 }
 
 static inline unsigned int hw_txbyte(struct s3c24xx_spi *hw, int count)

-- 
---------------------------------
Zhenwen Xu - Open and Free
Home Page:	http://zhwen.org
My Studio:	http://dim4.cn

View attachment "0001-rewrite-the-return-method-of-static-int-s3c24xx_spi_setup.patch" of type "text/x-diff" (1053 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ