The patch titled drivers/rtc/rtc-rs5c372.c: fix a NULL dereference has been added to the -mm tree. Its filename is drivers-rtc-rtc-rs5c372c-fix-a-null-dereference.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: drivers/rtc/rtc-rs5c372.c: fix a NULL dereference From: Adrian Bunk <bunk@xxxxxxxxx> The correct order is: NULL check before dereference This was a guaranteed NULL dereference with debugging enabled since rs5c372_sysfs_show_osc() does actually pass NULL... Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx> Acked-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/rtc/rtc-rs5c372.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/rtc/rtc-rs5c372.c~drivers-rtc-rtc-rs5c372c-fix-a-null-dereference drivers/rtc/rtc-rs5c372.c --- a/drivers/rtc/rtc-rs5c372.c~drivers-rtc-rtc-rs5c372c-fix-a-null-dereference +++ a/drivers/rtc/rtc-rs5c372.c @@ -126,13 +126,13 @@ static int rs5c372_get_trim(struct i2c_c return -EIO; } - dev_dbg(&client->dev, "%s: raw trim=%x\n", __FUNCTION__, *trim); - if (osc) *osc = (buf & RS5C372_TRIM_XSL) ? 32000 : 32768; - if (trim) + if (trim) { *trim = buf & RS5C372_TRIM_MASK; + dev_dbg(&client->dev, "%s: raw trim=%x\n", __FUNCTION__, *trim); + } return 0; } _ Patches currently in -mm which might be from bunk@xxxxxxxxx are origin.patch drivers-rtc-rtc-rs5c372c-fix-a-null-dereference.patch make-drivers-acpi-baycdrive_bays-static.patch make-drivers-acpi-eccec_ecdt-static.patch git-alsa.patch tidy-gregkh-driver-udev-compatible-hack.patch drivers-media-video-cafe_ccicc-make-a-function-static.patch git-gfs2-nmw.patch git-mtd.patch git-net.patch net-uninline-skb_put-fix.patch git-ocfs2.patch drivers-pci-hotplug-ibmphp_pcic-fix-null-dereference.patch git-scsi-misc.patch drivers-scsi-small-cleanups.patch drivers-scsi-aic7xxx-aic79xx_corec-make-ahd_match_scb-static.patch drivers-scsi-advansysc-cleanups.patch megaraid-fix-warnings-when-config_proc_fs=n.patch drivers-scsi-dpt_i2oc-remove-dead-code.patch git-cryptodev.patch acx1xx-wireless-driver.patch drivers-edac-make-code-static.patch remove-drivers-pci-searchcpci_find_device_reverse.patch ext4_ext_split-remove-dead-code.patch the-scheduled-removal-of-some-oss-options.patch make-arch-i386-pci-commoncpci_bf_sort-static.patch fs-reiser4-possible-cleanups.patch reiser4-possible-cleanups-2.patch make-drivers-md-dm-snapcksnapd-static.patch gtod-persistent-clock-support-i386-i386-unexport-read_persistent_clock.patch updated-i386-convert-to-clock-event-devices-arch-i386-kernel-apicc-make-a-function-static.patch updated-i386-convert-to-clock-event-devices-remove-arch-i386-kernel-time_hpetchpet_reenable.patch slim-main-patch-security-slim-slm_mainc-make-2-functions-static.patch slab-cache-shrinker-statistics.patch debug-shared-irqs-kconfig-fix.patch i386-enable-4k-stacks-by-default.patch mutex-subsystem-synchro-test-module.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html