Skip to content

Conversation

@6by9
Copy link
Contributor

@6by9 6by9 commented Jan 21, 2020

Issue noted when JC was trying to unload and reload an overlay for the V4L2 HEVC codec.
Made checkpatch clean (other than DT compatible string) whilst I was at it.

The legacy name support created a new device that was never destroyed.
If the driver was unloaded and reloaded, it failed due to the
device already existing.

Fixes: "75f1d14 driver: char: rpivid - also support legacy name"
Signed-off-by: Dave Stevenson <[email protected]>
6by9 added 5 commits January 21, 2020 16:38
The driver used an unnecessary intermediate void* variable so it
only called ERR_PTR once to convert to the error value.

Switch to converting as the error arises to remove these intermediate
variables.

Signed-off-by: Dave Stevenson <[email protected]>
The return value from device_create for the legacy device was never
checked or handled. Add the required error handling.

Signed-off-by: Dave Stevenson <[email protected]>
Makes checkpatch happier.

Signed-off-by: Dave Stevenson <[email protected]>
Stops checkpatch complaining.

Signed-off-by: Dave Stevenson <[email protected]>
The error path during probe frees the private memory block, and
then promptly dereferences it to log an error message.

Use the base device instead of the pointer to it in the private
structure.

Signed-off-by: Dave Stevenson <[email protected]>
@6by9
Copy link
Contributor Author

6by9 commented Jan 21, 2020

Updated. Reworked the conversion from PTR to ERR overall.
Added an extra patch to remove a deref of priv when we've just freed it too!

@6by9 6by9 force-pushed the rpi-5.4.y-rpimem branch from e563d16 to 2c07ce2 Compare January 21, 2020 16:49
@pelwell pelwell merged commit 52b9a7e into raspberrypi:rpi-5.4.y Jan 21, 2020
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 22, 2020
kernel: sound: Add the HiFiBerry DAC+HD version
See: raspberrypi/linux#3418

kernel: Fixup rpimem to cleanly unload and reload, and make checkpatch clean
See: raspberrypi/linux#3419

kernel: Amend init order of TPM and IMA modules
See: raspberrypi/linux#3297

kernel: net: usb: lan78xx: Add .ndo_features_check
See: raspberrypi/linux#3395

firmware: platform: Only throttle down from arm_freq

firmware: platform: Bump desired ring osc to 3.7 on Pi3/CM3

firmware: arm_loader: Add 2ms delay before resetting SD_IO
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Jan 22, 2020
kernel: sound: Add the HiFiBerry DAC+HD version
See: raspberrypi/linux#3418

kernel: Fixup rpimem to cleanly unload and reload, and make checkpatch clean
See: raspberrypi/linux#3419

kernel: Amend init order of TPM and IMA modules
See: raspberrypi/linux#3297

kernel: net: usb: lan78xx: Add .ndo_features_check
See: raspberrypi/linux#3395

firmware: platform: Only throttle down from arm_freq

firmware: platform: Bump desired ring osc to 3.7 on Pi3/CM3

firmware: arm_loader: Add 2ms delay before resetting SD_IO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants