[PATCH] pinctrl: sh-pfc: Unlock on error in sh_pfc_func_set_mux()

2019-08-27 Thread Dan Carpenter
We need to unlock and enable IRQs before we return on this error path. Fixes: 8a0cc47ccc7c ("pinctrl: sh-pfc: Rollback to mux if required when the gpio is freed") Signed-off-by: Dan Carpenter --- drivers/pinctrl/sh-pfc/pinctrl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletion

[bug report] media: rcar-vin: add group allocator functions

2018-05-03 Thread Dan Carpenter
^^^ 350 out: 351 mutex_unlock(&vin->group->lock); 352 353 kref_put(&vin->group->refcount, rvin_group_release); ^^^^^^^^ There are a bunch of NULL dereferences here... 354 } regards, dan carpenter

Re: [PATCH v2 5/5] drm: adv7511: Add support for i2c_new_secondary_device

2018-02-12 Thread Dan Carpenter
adv7511_probe(struct i2c_client *i2c, const > struct i2c_device_id *id) > adv7511_audio_init(dev, adv7511); > return 0; > > +err_unregister_packet: > + i2c_unregister_device(adv7511->i2c_packet); > err_unregister_cec: > i2c_unregister_device(adv7511->i2c_cec); > if (adv7511->cec_clk) regards, dan carpenter

Re: [PATCH 0/4] tree-wide: fix comparison to bitshift when dealing with a mask

2018-02-06 Thread Dan Carpenter
e two bugs that Geert found where the right side wasn't a number literal. drivers/net/can/m_can/m_can.c:#define RXFC_FWM_MASK (0x7f < RXFC_FWM_SHIFT) drivers/usb/gadget/udc/goku_udc.h:#define INT_EPnNAK(n) (0x00100 < (n)) /* 0 < n < 4 */ regards, dan carpenter

Re: [PATCH 0/4] tree-wide: fix comparison to bitshift when dealing with a mask

2018-02-06 Thread Dan Carpenter
On Tue, Feb 06, 2018 at 02:15:51PM +0100, Julia Lawall wrote: > > > On Tue, 6 Feb 2018, Dan Carpenter wrote: > > > On Mon, Feb 05, 2018 at 09:09:57PM +0100, Wolfram Sang wrote: > > > In one Renesas driver, I found a typo which turned an intended bit shift > >

Re: [PATCH 0/4] tree-wide: fix comparison to bitshift when dealing with a mask

2018-02-06 Thread Dan Carpenter
e. Julia the bugs look like this: - reissue_mask |= 0x < 4; + reissue_mask |= 0x << 4; regards, dan carpenter > Wolfram Sang (4): > v4l: vsp1: fix mask creation for MULT_ALPHA_RATIO > drm/exynos: fix comparison to bi

Re: Unicode characters in commit messages?

2017-10-25 Thread Dan Carpenter
ck not sufficient so far to reach > a final consensus. Markus, you really have to listen better or you're going to get banned from more subsystems. These long email threads are a waste of time when we already answered your questions completely and over and over. The feedback was clear. regards, dan carpenter

Re: drm/rcar-du: Adjust 14 checks for null pointers

2017-10-25 Thread Dan Carpenter
; >> > > > > This one is fine > > This kind of feedback is nice. > > > > except for the commit message. > > Would you like to support Unicode characters there? > Multiple people have answered this question already and I have answered it multiple times. regards, dan carpenter

Re: [PATCH 2/2] drm/rcar-du: Adjust 14 checks for null pointers

2017-10-24 Thread Dan Carpenter
ormation out like the following. > > Comparison to NULL could be written !… > > Thus fix the affected source code places. > This one is fine except for the commit message. regards, dan carpenter

Re: [PATCH 1/2] drm/rcar-du: Use common error handling code in rcar_du_encoders_init()

2017-10-24 Thread Dan Carpenter
goto free_three; } Of course, having a big unlock label makes sense if you take a lock at the start of the function and need to drop it at the end. But in this case we are taking a lock then dropping it, and taking the next, then dropping it and so on. It's a differen

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-17 Thread Dan Carpenter
27;ret' > > wouldn't > > break something. > > I think Dan was recommending the opposite here, if I understood you > both correctly: > he said we should propagate the error code unless we know it's wrong, while > you > want to keep the current behavior to avoid introducing changes ;-) > I don't know the subsystem rules at all, so don't listen to me. regards, dan carpenter

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
On Fri, Jul 14, 2017 at 03:55:26PM +0300, Dan Carpenter wrote: > I don't agree with it as a static analysis dev... What I mean is if it's a macro that returns -ENODEV or a function that returns -ENODEV, they should both be treated the same. The other warnings this check prints are

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
Ah... I see why it's complaining about these ones in particular... I don't agree with it as a static analysis dev, and I don't like the changes too much. But since it's only generating a hand full of warnings then I don't care. regards, dan carpenter

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
lse if (fmt_info->code == MEDIA_BUS_FMT_UYVY8_2X8) 1175 bridge = ISPCTRL_PAR_BRIDGE_BENDIAN; 1176 else 1177 bridge = ISPCTRL_PAR_BRIDGE_DISABLE; 1178 1179 omap3isp_configure_bridge(isp, ccdc->input, parcfg, shift, bridge); regards, dan carpenter

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
rate at finding real bugs. Just disable it. Changing the code to propagate error codes, is the right thing of course so long as it doesn't introduce bugs. regards, dan carpenter

[PATCH] drm: shmobile: checking for NULL instead if IS_ERR()

2017-07-12 Thread Dan Carpenter
We changed from ioremap_nocache() to devm_ioremap_resource() so the check needs to be changed from checking for NULL to checking for error pointers. Fixes: 16ad3b2ce8dd ("drm/shmobile: Use devm_* managed functions") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/dr

Re: [bug report] mmc: tmio-mmc: add support for 32bit data port

2017-07-03 Thread Dan Carpenter
e should be adding "count / (sizeof(*buf))". > > I agree this math does not work out to what I wanted because of the > differences in data types. > > Since I simply wanted to get a pointer to where I left off in the > buffer, maybe the most clear thing to do is just cast buf and do simple math: > >buf8 = (u8 *)buf + (count & ~3); > > > Do you agree? Sure. Unless you want to round up? regards, dan carpenter

[PATCH] drm: rcar-du: remove an unneeded NULL check

2017-06-30 Thread Dan Carpenter
"params" can't be NULL here. The next lines assume that we either hit the break statement of "params->mpixelclock == ~0UL". The inconsistent NULL checking makes static checkers complain. I've just removed the test. Signed-off-by: Dan Carpenter dif

Re: [PATCH 0/4] ASoC: tidyup return method from probe()

2017-05-18 Thread Dan Carpenter
Thanks! regards, dan carpenter

[PATCH net] ravb: Double free on error in ravb_start_xmit()

2017-04-22 Thread Dan Carpenter
If skb_put_padto() fails then it frees the skb. I shifted that code up a bit to make my error handling a little simpler. Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") Signed-off-by: Dan Carpenter diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/ne

[patch] net: renesas: ravb: unintialized return value

2016-12-01 Thread Dan Carpenter
We want to set the other "err" variable here so that we can return it later. My version of GCC misses this issue but I caught it with a static checker. Fixes: 9f70eb339f52 ("net: ethernet: renesas: ravb: fix fixed-link phydev leaks") Signed-off-by: Dan Carpenter --- Applies