The patch number 8790 was added via Hans Verkuil <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Hans Verkuil  <[EMAIL PROTECTED]>
saa7115: call i2c_set_clientdata only when state != NULL


Not a bug as such, but it looks really strange doing this before
checking whether the state structure could be allocated.

Priority: normal

Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/saa7115.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -r 89a779c4a801 -r bb594656b7cb linux/drivers/media/video/saa7115.c
--- a/linux/drivers/media/video/saa7115.c       Sun Aug 24 11:29:30 2008 +0200
+++ b/linux/drivers/media/video/saa7115.c       Sun Aug 24 13:34:15 2008 +0200
@@ -1498,10 +1498,9 @@ static int saa7115_probe(struct i2c_clie
                 client->addr << 1, client->adapter->name);
 
        state = kzalloc(sizeof(struct saa711x_state), GFP_KERNEL);
+       if (state == NULL)
+               return -ENOMEM;
        i2c_set_clientdata(client, state);
-       if (state == NULL) {
-               return -ENOMEM;
-       }
        state->input = -1;
        state->output = SAA7115_IPORT_ON;
        state->enable = 1;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/bb594656b7cb885b510f670d22ecdb31d0f2ed7b

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to