]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
mtd/m25p80: retlen is never NULL
authorDan Carpenter <error27@gmail.com>
Thu, 12 Aug 2010 07:53:52 +0000 (09:53 +0200)
committerJohn Linn <john.linn@xilinx.com>
Thu, 14 Oct 2010 18:52:49 +0000 (12:52 -0600)
commit72df710c8494f9537a1c16c36c7cb4a0883e64d8
tree557957219c381b4028079ba47ec5cae5bce92898
parent1a0a925098fdda183adba345dd5bd61ca412f5d2
mtd/m25p80: retlen is never NULL

This is just a cleanup, it doesn't fix any bugs.

These functions all check retlen inconsistently and it generates a
warning in Smatch (http://smatch.sf.net).  If retlen were ever NULL it
would cause an oops and the code has been this way since 2006 so someone
would have complained.  Also I looked at other places that implemented
the mtd read and write functions and they dereference retlen without
checking.

I removed the checks.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/m25p80.c