spi: fsl-dspi: Remove possible memory leak of 'chip'
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Sat, 31 Jan 2015 16:33:25 +0000 (22:03 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 2 Feb 2015 20:05:19 +0000 (20:05 +0000)
Move the check for spi->bits_per_word
before allocation, to avoid memory leak.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

No differences found